java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
今天在进行spring boot测试时出现该异常:
原因是:启动类的位置有问题
错误:
正确:
总的来说:如果出现该错误,可以检查并调整一下启动类的位置。
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
今天在进行spring boot测试时出现该异常:
原因是:启动类的位置有问题
错误:
正确:
总的来说:如果出现该错误,可以检查并调整一下启动类的位置。