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 file. Lastly, I created an object in the main file and ran the Spring Boot application.
DATABASE CONFIGURATION:
- spring.datasource.name\= test
spring.datasource.url = jdbc:mysql://localhost:3306/test
spring.datasource.username= root
3.spring.datasource.password= Swayamjg123
spring.datasource.dbcp2.driver-class-name= com.mysql.cj.jdbc.Driver
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
spring.jpa.hibernate.ddl-auto=update