Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] 개발서버 DB H2에서 MySQL로 이관 #132

Merged
merged 2 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'

implementation 'mysql:mysql-connector-java:8.0.32'

annotationProcessor 'org.projectlombok:lombok'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
Expand Down
21 changes: 21 additions & 0 deletions backend/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: ${MYSQL_DATABASE_URL}
username: ${MYSQL_DATABASE_USER_NAME}
password: ${MYSQL_DATABASE_PASSWORD}
jpa:
properties:
hibernate:
format_sql: true
show-sql: true
hibernate:
ddl-auto: none
logging:
level:
org:
hibernate:
type:
descriptor:
sql:
BasicBinder: TRACE
9 changes: 0 additions & 9 deletions backend/src/main/resources/application.properties

This file was deleted.

23 changes: 23 additions & 0 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
spring:
datasource:
username: sa
url: jdbc:h2:mem:mapbefine;MODE=MySQL
h2:
console:
enabled: true
path: /h2-console
jpa:
properties:
hibernate:
format_sql: true
show-sql: true
hibernate:
ddl-auto: create
logging:
level:
org:
hibernate:
type:
descriptor:
sql:
BasicBinder: TRACE
Loading