dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Intermediate
Dec 23, 2019

WEBINAR:

On-Demand

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


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
 
Thanks for your registration, follow us on our social networks to keep up-to-date