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要和测试类在同一级包下

 

posted @ 2019-12-05 14:08  唐桑和歌但  阅读(1085)  评论(0编辑  收藏  举报