you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

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

 

解决方法:

那是因为@SpringBootTest中缺少classes属性配置,加上启动类的class即可,如下:http://www.yayihouse.com/yayishuwu/chapter/2265

你可能感兴趣的:(you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test)