Skip to content

Commit

Permalink
Merge pull request #98 from BaeJunH0/feat/#62-connectingWithDB
Browse files Browse the repository at this point in the history
[Feat] db 연결을 위한 설정
  • Loading branch information
BaeJunH0 authored Jan 6, 2025
2 parents 648134a + 900bbc2 commit d0bb4a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ spring.config.import=optional:file:.env[.properties]

# h2-console enable
spring.h2.console.enabled=true
spring.datasource.url = jdbc:h2:mem:test

# jpa-set
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.format_sql=true

# add admin temporary
spring.sql.init.mode=always
spring.sql.init.data-locations=classpath:sql/data.sql
# db setting
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=${SPRING_DATASOURCE_URL}
spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}

# visible sql
spring.jpa.show-sql=true
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/sql/data.sql

This file was deleted.

0 comments on commit d0bb4a9

Please sign in to comment.