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] issue102: Mysql 위한 인스턴스 생성 및 세팅 #103

Merged
merged 1 commit into from
Jul 21, 2022
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
1 change: 1 addition & 0 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.rest-assured:rest-assured'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'mysql:mysql-connector-java'

// querydsl
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}"
Expand Down
8 changes: 4 additions & 4 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ spring:
hibernate:
dialect: org.hibernate.dialect.MySQL8Dialect
datasource:
driver-class-name: org.h2.Driver
username: sa
password:
url: jdbc:h2:mem:~/moamoa;MODE=MYSQL
driver-class-name: com.mysql.cj.jdbc.Driver
username: ${USERNAME}
password: ${PASSWORD}
url: ${MYSQL}
profiles:
include: security
17 changes: 17 additions & 0 deletions backend/src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
spring:
sql:
init:
mode: always
jpa:
hibernate:
ddl-auto: none
properties:
hibernate:
dialect: org.hibernate.dialect.MySQL8Dialect
datasource:
driver-class-name: org.h2.Driver
username: sa
password:
url: jdbc:h2:mem:~/moamoa;MODE=MYSQL
profiles:
include: security