

点击运行后发现:
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
解决方法:在根目录下独立出单独的启动类:

点击运行后发现:
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
解决方法:在根目录下独立出单独的启动类:
本文标题:Mac IDEA Spring Boot 单元测试
本文链接:https://www.haomeiwen.com/subject/skvmoqtx.html
网友评论