spring-boot启动报错: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test ![]() 找不到@SpringBootConfiguration注解,可是在我的工程里面没有显示的引用@SpringBootConfiguration注解,排解了一下,原因是我的测试类所在的包跟启动类(main方法的类Application.java)不一致,改成一致的就work了 |
|
来自: 小清风的doc > 《springframework》