错误:Type mismatch: cannot convert from Class<SpringJUnit4ClassRunner> to Class<? extends Runner>
来源:互联网 发布:国家电网有多厉害 知乎 编辑:程序博客网 时间:2024/05/18 01:02
今天博主在写单元测试的时候,在给测试类添加@RunWith(SpringJUnit4ClassRunner.class)注解发现报一下错误:
Type mismatch: cannot convert from Class<SpringJUnit4ClassRunner> to Class<? extends Runner>
这是由于博主用的spring3.0,junit.4.4,发现spring不支持junit.4.4这个版本,只需把junit升级到更高版本就不会出现这个错误了。
0 0
- 错误:Type mismatch: cannot convert from Class<SpringJUnit4ClassRunner> to Class<? extends Runner>
- Type mismatch: cannot convert from Class<SpringJUnit4ClassRunner> to Class<? extends Runner>
- Type mismatch: cannot convert from CharFragment to Fragment错误
- Eclipse下junit@Test出现Type mismatch: cannot convert from Test to Annotation错误
- junit Type mismatch: cannot convert from Test to Annotation | eclipse junit 的Test错误
- Eclipse下junit@Test出现Type mismatch: cannot convert from Test to Annotation错误
- Type mismatch: cannot convert from Controller to Annotation错误解决方式
- The resolution of ERROR C2662: cannot convert 'this' pointer from "const Class-Type" to "Class&"
- junit Type mismatch: cannot convert from Test to Annotation
- Type mismatch: cannot convert from Test to Annotation
- Id Type mismatch: cannot convert from connection to connection
- Type mismatch: cannot convert from Object to String
- Type mismatch: cannot convert from Enumeration<String> to Enumeration<Object>
- Type mismatch: cannot convert from MainFragment to Fragment 报错
- Type mismatch: cannot convert from MainFragment to Fragment 报错
- Type mismatch: cannot convert from Test to Annotation
- Type mismatch: cannot convert from Object to String
- Type mismatch: cannot convert from MainFragment to Fragment 报错
- POJ 1451 T9 字典树+优先队列
- Java多少Threads会挂掉
- Storm Found multiple defaults.yaml resources
- 利用predis操作redis方法大全(方便自己使用)
- 人脸数据库汇总
- 错误:Type mismatch: cannot convert from Class<SpringJUnit4ClassRunner> to Class<? extends Runner>
- iOS开发之xib技巧介绍
- 多个.c .h文件时出现的重复定义错误问题
- WWDC2014之App Extensions学习笔记
- 当前栏目高亮/选中状态代码
- 记录1
- hdu3746 Cyclic Nacklace 利用kmp算最小周期
- 状态机模式
- 强大的Core Image(教你做自己的美图秀秀)