搭建springboot,報錯:Failed to configure a DataSource: 'url' attribute is not specified and no embedd。

第一次打開項目報白頁,第二次突然就啓動不了了,而且控制檯報錯如下:

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 class

Action:

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).

找了很久的原因,發現是pom.xml的project總是報紅線。先clean一下,然後install,發現有個jar包有問題

然後打開本地maven倉庫,把其他版本的jar包刪掉,把2.1.9版本里面的文件都刪掉,重新download一下,發現果然有問題,只下載了一個xxxxxpom.lastUpdated.在網上找一下jar包,把jar包更換一下再次打開項目,就不報錯了,同時也不報白頁了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章