Springboot项目测试类,报错Unable to find a @SpringBootConfiguration, you need to use @ContextConfigura

解决: 注解加需要测试的class

@SpringBootTest(classes = StudentInfoServiceImpl.class)
@RunWith(SpringRunner.class)
原文地址:https://www.cnblogs.com/wqkeep/p/13042989.html