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

I'm the best發表於2020-12-01

錯誤提示

Description:

Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine suitable jdbc url

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

Disconnected from the target VM, address: ‘127.0.0.1:60306’, transport: ‘socket’

Process finished with exit code 0

解決辦法

這個情況有兩種一種是你的配置出錯了,比如jdbc ip埠賬號密碼什麼的沒寫
第二種是一定要把spring boot啟動類放在最外側

相關文章