原文:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

一 問題描述 原因就是springboot找到數據源的配置,但配置是有的,而且是正確的,為什么提示這個錯誤 二 解決方案: 其實這個問題是包 package 路徑的問題 在Springboot中,會自動掃描主啟動類 SpringBootApplication 包及所有子包 當你修改了主啟動類的包名時,如將com.datasource修改成com.ds,但之前的子包沒有同時修改,就會出現獲取不到u ...

2020-04-24 10:15 0 764 推薦指數:

查看詳情

 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM