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

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

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

2019-11-10 20:26:41
字體:
供稿:網(wǎng)友

今天使用junit做沒底時(shí),報(bào)了一個(gè)提示!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"));} }

仔細(xì)檢查了一下,類名也叫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ā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 河东区| 蒙山县| 曲阜市| 工布江达县| 五家渠市| 玉山县| 益阳市| 荥阳市| 彰化县| 泰和县| 罗定市| 教育| 阿尔山市| 西青区| 泰兴市| 古丈县| 阳朔县| 苗栗县| 大名县| 临清市| 温泉县| 镇平县| 绵竹市| 广南县| 灯塔市| 乌兰浩特市| 长武县| 延安市| 重庆市| 内江市| 新乐市| 房山区| 尼木县| 会东县| 德惠市| 温州市| 福州市| 汽车| 阜城县| 广宁县| 五家渠市|