Skip to content

Commit

Permalink
#39 - 테스트용 인메모리 DB: H2 프로퍼티 셋업
Browse files Browse the repository at this point in the history
스프링 부트에서 H2를 이용할 수 있도록
H2 프로퍼티 설정을 추가.
아직 사용하는 스프링 프로파일은 아니지만
미리 mysql 호환성 모드를 준비하기 위해
`test` 프로파일과 관련 설정도 추가함.
  • Loading branch information
djkeh committed Jul 29, 2024
1 parent bb85f13 commit 11da6c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ logging:

spring:
application.name: test-data
datasource.url: jdbc:h2:mem:testdb
jpa:
open-in-view: false
defer-datasource-initialization: true
Expand All @@ -15,3 +16,9 @@ spring:
properties:
hibernate.format_sql: true
sql.init.mode: always

---

spring:
config.activate.on-profile: test
datasource.url: jdbc:h2:mem:testdb;MODE=MySQL;DATABASE_TO_LOWER=TRUE

0 comments on commit 11da6c9

Please sign in to comment.