Mac IDEA Spring Boot 单元测试
2019-05-08 本文已影响0人
minguoIT男
类
测试类
点击运行后发现:
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
解决方法:在根目录下独立出单独的启动类:
成功运行