解决springboot启动报java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=…) with your test 分析项目的目录结构,有没有启动类。 下面我拿我的项目举个例子 上图可知,我的启动类放错了位置,没有在包的根目录上。 再运行问题解决!!! 相关文章: 2021-10-24 2021-12-03 2021-09-08 2021-05-06 2021-10-10 2021-08-14