SpringBoot测试类启动错误:Unable to find a @SpringBootConfiguration 发表于 2019-07-03 | 分类于 ---SpringBoot | 报错信息java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test… 解决方案测试类,和主运行类,需要包名相同,才可以执行。