This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12915|Reply: 0

[Source] Failed to configure a DataSource

[Copy link]
Posted on 2/20/2019 1:19:05 PM | | |

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

Excerpted from:The hyperlink login is visible.

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

This is because the project has just been created and the data source has not been configured, so the URL cannot be specified

You can add a parameter to the comment @SpringBootApplication () of the class again

The following is fine:


This way there will be no errors!




Previous:Connection settings for various databases in Springboot Hibernate
Next:Spring Boot Hibernate Druid MySQL Project Construction Tutorial [with source code]
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com