pom文件明明引入了unit,为什么还是用不了@Test?
配置如下:
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope>
原因:上述scope配置了Junit可用的位置,test表示只能在src下的test文件夹下面才可以使用
解决办法:去掉scope配置就可以了
pom文件明明引入了unit,为什么还是用不了@Test?
配置如下:
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope>
原因:上述scope配置了Junit可用的位置,test表示只能在src下的test文件夹下面才可以使用
解决办法:去掉scope配置就可以了
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。