Last active
July 7, 2019 19:44
-
-
Save iamitshri/dc1b37e10bddc08be267bf11a0f060bd to your computer and use it in GitHub Desktop.
Spring Boot JPA configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring.datasource.url=jdbc:mysql://host:3306/dbname?autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC | |
spring.datasource.username=username | |
spring.datasource.password=password | |
spring.jpa.show-sql=true | |
spring.jpa.properties.hibernate.format_sql=true | |
spring.jpa.generate-ddl=true | |
spring.jpa.hibernate.ddl-auto=none | |
spring.jpa.database=mysql | |
spring.jpa.properties.hibernate.hbm2ddl.auto=none | |
# setting time zone | |
spring.jpa.properties.hibernate.jdbc.time_zone=UTC | |
spring.datasource.driver-class-name=com.mysql.jdbc.Driver | |
## This is cool, it will output the parameters | |
logging.level.org.hibernate.type.descriptor.sql=trace | |
logging.level.org.hibernate.type=trace | |
spring.jpa.properties.hibernate.generate_statistics=true | |
logging.level.org.hibernate.stat=debug | |
# Activate Eager fetching | |
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment