maven编译没问题,打包出错,解决办法

报错信息如下

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.567 s <<< FAILURE! - in com.zove.springboot.SpringbootApplicationTests
contextLoads Time elapsed: 0.002 s <<< ERROR!

在这里插入图片描述

解决办法如下:

删除生成的测试类:
在这里插入图片描述
再次打包就ok!
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/m0_46267375/article/details/115464842