用maven的package命令打包

默认会运行test单元测试类,如下图
spring boot 打包时如何跳过单元测试

打包跳过运行测试类

修改pom脚本,跳过单元测试即可

org.apache.maven.plugins
maven-surefire-plugin

true

如图:
spring boot 打包时如何跳过单元测试

这时候再打包,就不会运行单元测试了,并且build success ,如图:
spring boot 打包时如何跳过单元测试

相关文章:

  • 2021-06-15
  • 2021-11-24
  • 2022-01-23
  • 2021-06-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-11
  • 2022-01-07
  • 2021-12-20
  • 2022-12-23
  • 2021-07-20
相关资源
相似解决方案