国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

解決test is not an annotation type一種方案

2019-11-10 21:01:47
字體:
來源:轉載
供稿:網友

今天使用junit做沒底時,報了一個提示!test is not an annotation type,在方法上加上@org.junit.Test就沒有問題,如下

import org.junit.Test;import redis.clients.jedis.Jedis;public class Test {@Test,此處提示Test is not an annotation typepublic void test_string() {Jedis jedis = new Jedis("localhost");System.out.PRintln("Connection to server successfully");jedis.set("mykey", "zosef");System.out.println("Server is running:"+jedis.get("mykey"));} }

仔細檢查了一下,類名也叫Test,結果是沖突了!暈了!改正后

import org.junit.Test;import redis.clients.jedis.Jedis;public class JedisTest { @Testpublic void test_string() {Jedis jedis = new Jedis("localhost");System.out.println("Connection to server successfully");jedis.set("mykey", "zosef");System.out.println("Server is running:"+jedis.get("mykey"));} }


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 鹰潭市| 凉城县| 望奎县| 浮山县| 醴陵市| 济源市| 东阳市| 闽清县| 宁安市| 英山县| 泸定县| 甘泉县| 北票市| 舒城县| 濉溪县| 通榆县| 南投市| 长寿区| 松滋市| 红桥区| 罗定市| 玉田县| 和平县| 阳城县| 苗栗县| 两当县| 石台县| 嵊泗县| 双峰县| 芷江| 镇康县| 大理市| 惠安县| 连云港市| 巴彦淖尔市| 临洮县| 文登市| 广汉市| 南开区| 曲松县| 阜新市|