Type mismatch: cannot convert from Class<SpringJUnit4ClassRunner> to Class<? extends Runner>
来源:互联网 发布:系统集成软件开发 编辑:程序博客网 时间:2024/05/18 13:31
spring和junit整合时报错Type mismatch: cannot convert from Class<SpringJUnit4ClassRunner> to Class<? extends Runner>,查资料发现我用junit4.0不支持SpringJUnit4ClassRunner。
然后把junit的版本升级的4.8.1就不报错了
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
注:我的项目是用maven构建的
然后把junit的版本升级的4.8.1就不报错了
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
注:我的项目是用maven构建的
阅读全文
0 0
- 错误:Type mismatch: cannot convert from Class<SpringJUnit4ClassRunner> to Class<? extends Runner>
- Type mismatch: cannot convert from Class<SpringJUnit4ClassRunner> to Class<? extends Runner>
- 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 CharFragment 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 报错
- Type mismatch: cannot convert from Test to Annotation
- Hibernate Type mismatch: cannot convert from CascadeType to CascadeType[]
- Type mismatch: cannot convert from Test to Annotation
- 解决Type mismatch: cannot convert from ByteMatrix to BitMatrix
- 十大编程算法助程序员走上高手之路
- 文章标题
- 面向对象相关
- redis知识点总结
- 记一次OOM异常
- Type mismatch: cannot convert from Class<SpringJUnit4ClassRunner> to Class<? extends Runner>
- 线程池ThreadPoolExecutor使用简介
- rtsp客户端 & ffmpeg解码(基于live555)
- dropZone.js使用
- Fedora 26
- js 小知识 3
- 关于Checked异常和UnChecked异常(即RuntimeException)
- java swing 右键双击按钮,界面隐藏某些元素
- abp按钮权限配置