In this post, we will discover about unable to determine jdbc url from datasource spring boot error
Cause of problem
In case if you didn’t configure the properties correctly, then you might face this exception in your application
Solution
Verify below things in your spring boot application
- dependency in pom.xml
- database properties in application.properties or application.yml
Dependecies in pom.xml
make sure you have spring data and respective database dependencies in your pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
Application.properties
Verify your application.properties or application.yaml have below database configuration
spring.datasource.url=jdbc:mysql://localhost:3306/beginnersbug
spring.datasource.username=root
spring.datasource.password=password
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
After configuring above two properties properly your application should works fine
Related Articles
no main manifest attribute, in – spring boot