Connect to a Database in Spring Boot

Instructing Spring Boot to connect to a database can be done in application.properties via the JDBC URL, user and password as in the following example:

spring.datasource.url=jdbc:mysql://localhost:3306/mydb?createDatabaseIfNotExist=truespring.datasource.username=rootspring.datasource.password=root
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

More From DevX