Skip to content

Instantly share code, notes, and snippets.

@DengYiping
Last active March 23, 2024 04:33
Show Gist options
  • Save DengYiping/25fc8a06813332d9bc24fd48f6022da9 to your computer and use it in GitHub Desktop.
Save DengYiping/25fc8a06813332d9bc24fd48f6022da9 to your computer and use it in GitHub Desktop.
Spring Application Properties for MariaDB
#Database Configuration
spring.datasource.url=jdbc:mariadb://localhost:3306/billboard
spring.datasource.username=root
spring.datasource.password=
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
#Hibernate Configuration
# Show or not log for each sql query
spring.jpa.show-sql=true
# Hibernate ddl auto (create, create-drop, update): with "update" the database
# schema will be automatically updated accordingly to java entities found in
# the project
spring.jpa.hibernate.ddl-auto=update
# Allows Hibernate to generate SQL optimized for a particular DBMS
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDB103Dialect
# naming strategy
# Naming strategy
spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl
spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
spring.jpa.open-in-view=false
# Spring Data Rest Setup
spring.data.rest.base-path=/api
# Spring Server setup
server.address=127.0.0.1
server.port=8080
server.compression.enabled=true
server.http2.enabled=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment