java报错:
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
报错原因:
测试类没有在引导类所在包以及子包内
解决办法:
- 将他移动到引导类所在包以及子包内
- 为测试类指明引导类
java报错:
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
测试类没有在引导类所在包以及子包内