diff --git a/backend/.gitignore b/backend/.gitignore index c2065bc26..be7ddef89 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -35,3 +35,7 @@ out/ ### VS Code ### .vscode/ + +### db-connection +application-h2.properties +application-mysql.properties diff --git a/backend/build.gradle b/backend/build.gradle index 6aecd7923..d06523464 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -26,7 +26,7 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' runtimeOnly 'mysql:mysql-connector-java' -// runtimeOnly 'com.h2database:h2' + runtimeOnly 'com.h2database:h2' } tasks.named('test') { diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index 97a396ecc..2b03e74b0 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -1,18 +1,5 @@ -# do not set two of datasource. -spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -#spring.datasource.driverClassName=org.h2.Driver - -# In-Memory mode -#spring.datasource.url=jdbc:h2:mem:test;DB_CLOSE_ON_EXIT=FALSE -#spring.datasource.username=sa -#spring.datasource.password= - -# aws mysql -spring.datasource.url=jdbc:mysql://ec2-15-165-159-189.ap-northeast-2.compute.amazonaws.com:3306/testdb?useSSL=false&useUnicode=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Seoul -spring.datasource.username=test -spring.datasource.password=team05 - -#spring.h2.console.enabled=true -#spring.h2.console.path=/h2-console - +# profiles: h2, mysql +spring.profiles.active=mysql +#logging - develop: debug, production: info +logging.level.com.team05.todolist=debug