SpringTest报错解决:
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
解决方案:在@SpringTest注解中添加属性(classes = )填写启动类
如我的启动类是MainApplication.class
报错得到解决