springboot测试启动报错java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

springboot测试启动报错:

java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test


解决:注意springboot启动类Application要和测试类在同一级包下

上一篇:Tomcat启动报错java.lang.ClassNotFoundException: javax.el.ExpressionFactory


下一篇:tomcat项目启动报错java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration……