Skip to content

Instantly share code, notes, and snippets.

@bijay-shrestha
Last active July 24, 2019 07:15
Show Gist options
  • Save bijay-shrestha/5d556bc588ce4bea7730bf9a71b4cb18 to your computer and use it in GitHub Desktop.
Save bijay-shrestha/5d556bc588ce4bea7730bf9a71b4cb18 to your computer and use it in GitHub Desktop.

Copy and Paste the following snippet into your spring boot application project and change the parametersas you find fit.

spring.datasource.url=jdbc:mysql://localhost:3306/jpa?createDatabaseIfNotExist=true
spring.datasource.username=root
spring.datasource.password=root
spring.jpa.hibernate.ddl-auto=create-drop


# The SQL dialect makes Hibernate generate better SQL for the chosen database
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.open-in-view=false


#Turn Statistics on
spring.jpa.properties.hibernate.generate_statistics=true
logging.level.org.hibernate.stat=debug


# Show all queries
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
#logging.level.org.hibernate.type=trace


# Disable feature detection by this undocumented parameter. Check the org.hibernate.engine.jdbc.internal.JdbcServiceImpl.configure method for more details.
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
spring.jackson.deserialization.fail-on-unknown-properties=false
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment