分享

java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

 小清风的doc 2017-11-12
spring-boot启动报错:
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

 
 

找不到@SpringBootConfiguration注解,可是在我的工程里面没有显示的引用@SpringBootConfiguration注解,排解了一下,原因是我的测试类所在的包跟启动类(main方法的类Application.java)不一致,改成一致的就work了




    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多