본문 바로가기

Web/DB

[mariaDB] Spring + mariaDB 연동

728x90

 

 

 

 

 

runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'

 

 

 

application.properties

spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.datasource.url=jdbc:mariadb://localhost:3306/DB명
spring.datasource.username=userName
spring.datasource.password=password

#update the schema with the given values.
spring.jpa.hibernate.ddl-auto=update
#To beautify or pretty print the SQL
spring.jpa.properties.hibernate.format_sql=true
#show sql
spring.jpa.properties.hibernate.show-sql=true
#show parameter binding
logging.level.org.hibernate.type.descriptor.sql=DEBUG

logging.level.org.hibernate.SQL=DEBUG

 

728x90