springboot test无法启动出现异常
@RunWith(SpringRunner.class)
@SpringBootTest
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...)
结果发现是测试类包不跟启动类包一致,修改一致即可。
springboot test无法启动出现异常
@RunWith(SpringRunner.class)
@SpringBootTest
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...)
结果发现是测试类包不跟启动类包一致,修改一致即可。
本文标题:SpringBootTest异常
本文链接:https://www.haomeiwen.com/subject/ctcvxhtx.html
网友评论