老人遇到新问题。先参考如下几篇文章:
https://blog.csdn.net/gnail_oug/article/details/80026001
https://blog.csdn.net/lby0307/article/details/78796411
https://blog.csdn.net/dodott/article/details/81147011
如果没有解决,继续下面:
mvn clean
mvn install
mvn package
可能还会有如下错误:
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.029 sec <<< FAILURE! - in com.*.demo.ASTransApaApplicationTests
initializationError(com.*.demo.ASTransApaApplicationTests) Time elapsed: 0.002 sec <<< ERROR!
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
at org.springframework.util.Assert.state(Assert.java:70)
at
...
..
.
请确认 Test 的打包路径与Application 打包路径一致。