解決java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use

1.遇到的問題: 在單元測試的時候報:java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use 問題有可能是有兩個: 1.你沒有寫啓動類: 2.雖然你寫了啓動類但是你的啓動類所在的包和單元測試的包不在同一級根目錄下。如上圖:一個是在cn.gitv.pro.charging.
相關文章
相關標籤/搜索