解决java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use

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

是因为我没在根目录下写一个springboot的启动类:写个App.class,再在test测试类跑起来就不会出现这个错误了

我的座右铭:不会,我可以学;落后,我可以追赶;跌倒,我可以站起来;我一定行。