spring:
datasource:
url: jdbc:h2:tcp://localhost/~/task_agile_test
username: sa
password:
driver-class-name: org.h2.Driver
jpa:
database-platform: org.hibernate.dialect.H2Dialect
open-in-view: false
hibernate:
ddl-auto: create-drop
properties:
hibernate:
show_sql: true
format_sql: true
logging:
level:
org.hibernate.type.descriptor.sql: trace
- spring.datasource : DB 연결정보
- spring.jpa.database-platform : 데이터 플래폼을 지정, 참고
- spring.jpa.open-in-view : osiv 웹요청이 완료될때까지 영속성을 가짐 (성능상 안 좋음)
- spring.jpa.hibernate.ddl-auto :
- none : No action is performed. The schema will not be generated.
- create : create the schema, the data previously present (if there) in the schema is lost
- create-drop : (default) create the schema with destroying the data previously present(if there). It also drop the database schema when the SessionFactory is closed.
- update : update the schema with the given values.
- validate : validate the schema. It makes no change in the DB.
- spring.jpa.properties.hibernate.format_sql : 실행쿼리를 가독성있게 표현
- spring.jpa.properties.hibernate.show-sql : 콘솔에 jpa 실행쿼리
- logging.level.org.hibernate.type.descriptor.sql : ? 부문을 로그로 출력해줌