Home » Tip Bank » Java
  • Comment on this Article
Language: Java
Expertise: Intermediate
Dec 23, 2019

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Watch

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=true
spring.datasource.username=root
spring.datasource.password=root
OCTAVIA ANGHEL
 
Submit a Tip
Browse "Java" Tips
Browse All Tips
sitepoint.com
javascriptkit.com