原创

springboot的测试启动失败

温馨提示:
本文最后更新于 2025年09月07日,已超过 278 天没有更新。若文章内的图片失效(无法正常加载),请留言反馈或直接联系我

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

解决方法:指定具体的 classes

@SpringBootTest  (classes = ProductMainApplication.class)
正文到此结束