Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
I am tring to connect to MySQL via SpringBoot JPA but running into the following error while starting.
***************************
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 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).
Process finished with exit code 1
1 Answer
3 years ago by Eleven
Looks like you are missing the MqSQL JDBC driver in your dependencies.
Add the following to your POM file
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
3 years ago by Karthik Divi