SpringBoot測試報錯:java.lang.IllegalStateException Unable to find a @SpringBootConfiguration

跑Spring Boot測試時,一開始源碼包路徑爲com.whf.product,而測試包路徑爲com.whf,導致跑測試類時提示找不到配置類,一開始也沒想到會有這種問題,參考下面的博客,將兩者改成一致即可。記錄一下。。。 參考博客:https://www.cnblogs.com/xing-nb/p/12147304.html
相關文章
相關標籤/搜索