pom文件明明引入了unit,为什么还是用不了@Test?

配置如下:

<dependency>  
      <groupId>junit</groupId>  
      <artifactId>junit</artifactId>  
      <version>${junit.version}</version>  
      <scope>test</scope>  

原因:上述scope配置了Junit可用的位置,test表示只能在src下的test文件夹下面才可以使用 

 

解决办法:去掉scope配置就可以了 

相关文章:

  • 2021-05-17
  • 2022-01-30
  • 2021-08-16
  • 2022-12-23
  • 2021-08-26
猜你喜欢
  • 2021-11-21
  • 2019-12-31
  • 2021-08-10
  • 2022-12-23
  • 2021-10-08
  • 2021-10-21
相关资源
相似解决方案