Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could

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

解決了上一個錯誤之後,又出現了新的錯誤:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured

根據英文意思應該是沒有配置數據源,導致的錯誤,只需要在application.properties中添加即可:

spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:ORCL
spring.datasource.username=zhangsan
spring.datasource.password=zhangsan

項目成功啓動。

發佈了80 篇原創文章 · 獲贊 38 · 訪問量 7726
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章