解决IDEA启动报错---找不到配置项
生活随笔
收集整理的這篇文章主要介紹了
解决IDEA启动报错---找不到配置项
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?報錯信息:
*************************** APPLICATION FAILED TO START ***************************Description:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.Reason: Failed to determine a suitable driver classAction:Consider the following:If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).發現問題:
啟動項目-->Build項目-->報錯無法啟動-->發現問題
1、target下目錄完好
2、在target下無配置文件
解決問題:
針對target下目錄完好情況:
檢查配置文件如application.properties中spring.datasource.url等配置項是否正確配置
在target下無配置文件:
1、更新maven,rebuild項目
2、右鍵resources目錄-->Make Directory as Resources Root,rebuild項目
3、檢查pom.xml中是否有不當配置并修改更新
4、pom.xml的build標簽下添加:
<resources><resource><directory>src/main/java</directory><includes><include>**/*.properties</include><include>**/*.xml</include></includes></resource><resource><directory>src/main/resources</directory><includes><include>**/*.*</include></includes></resource> </resources>然后更新maven,rebuild項目
5、代碼拷出來重新導入
總結
以上是生活随笔為你收集整理的解决IDEA启动报错---找不到配置项的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Process finished wit
- 下一篇: fabric使用配置文件configtx