# Spring Boot Day 7

On the 7th day of learning Spring Boot, I learned about configuring the database. I started by creating a Spring Boot starter project and then added two dependencies: "spring data jpa" and "MySQL connector". Next, I created a user entity with private members. After that, I created a user repository. I applied the database configuration in the [application.properties](http://application.properties) file. Lastly, I created an object in the main file and ran the Spring Boot application.

DATABASE CONFIGURATION:

1. [spring.datasource.name](http://spring.datasource.name)\= test
    

1. spring.datasource.url = jdbc:mysql://[localhost:3306/test](http://localhost:3306/test)
    
2. spring.datasource.username= root
    
3. 3.spring.datasource.password= Swayamjg@[123](@456)
    
4. spring.datasource.dbcp2.driver-class-name= com.mysql.cj.jdbc.Driver
    
5. [spring.jpa.properties](http://spring.jpa.properties).hibernate.dialect = org.hibernate.dialect.MySQLDialect
    
6. spring.jpa.hibernate.ddl-auto=update
