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

首頁 > 學院 > 開發(fā)設(shè)計 > 正文

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

2019-11-10 23:28:46
字體:
供稿:網(wǎng)友

今天使用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,結(jié)果是沖突了!暈了!改正后

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"));} }


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 惠州市| 巢湖市| 扶余县| 宾川县| 即墨市| 凤翔县| 盐城市| 巴林左旗| 类乌齐县| 托里县| 镇平县| 呈贡县| 宜丰县| 二手房| 自治县| 井冈山市| 北安市| 永泰县| 竹溪县| 阜城县| 确山县| 岢岚县| 安岳县| 中西区| 将乐县| 沧源| 贺兰县| 旺苍县| 外汇| 抚顺市| 呼图壁县| 池州市| 蛟河市| 交城县| 额尔古纳市| 巴青县| 房产| 交城县| 马山县| 梁河县| 铜陵市|