- Spring Boot ORM - Test EclipseLink
- Update Project EclipseLink
- Maven EclipseLink
- Spring Boot ORM - Test Hibernate
- Spring Boot ORM - Update Project
- Application.properties
- Spring Boot ORM - Create Project
- Environment Setup
- Spring Boot ORM - Overview
- Spring Boot ORM - Home
Spring Boot ORM Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Spring Boot ORM - Apppcation.properties
Spring boot reads apppcation as well as persistence related properties from apppcation.properties. Here we can configure the hibernate or any other ORM framework specific properties as well. We re using generic properties so that we can switch between ORM without changing much code. By default, spring boot configure hibernate as ORM provider if no other ORM pbrary is specified in POM.xml.
Create apppcation.properties under src −> main −> resources directory and update as shown below.
apppcation.properties
#datasource configurations spring.datasource.url=jdbc:mysql://localhost:3306/tutorialspoint?useSSL=false&allowPubpcKeyRetrieval=true spring.datasource.username=root spring.datasource.password=root@123 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # show SQL spring.jpa.show-sql: true # DDL generation spring.jpa.generate-ddl=true
Following is the description of key attributes of apppcation.properties.
spring.datasource − Database specific attributes pke connection url, username, password, driver class etc.
spring.jpa − jpa specific attributes pke to show sql, to allow create tables etc.