diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index f277f34..aa84ea8 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -16,10 +16,11 @@ spring: config: activate: on-profile: prod + datasource: - url: jdbc:mysql://db-p93qe.vpc-cdb.ntruss.com:3306/nutridiary - username: koo995 - password: koo995** + url: ${MYSQL_URL} + username: ${MYSQL_USERNAME} + password: ${MYSQL_PASSWORD} driver-class-name: com.mysql.cj.jdbc.Driver sql: init: @@ -27,14 +28,6 @@ spring: schema-locations: classpath:db/schema.sql data-locations: optional:classpath:db/data.sql -cloud: - aws: - s3: - config: true - endpoint: ${S3_END_POINT} - bucketName: ${S3_BUCKET_NAME} - regionName: ${AWS_REGION_NAME} - logging: level: org: @@ -59,14 +52,6 @@ spring: schema-locations: classpath:db/schema.sql data-locations: optional:classpath:db/data.sql -cloud: - aws: - s3: - config: true - endpoint: ${S3_END_POINT} - bucketName: ${S3_BUCKET_NAME} - regionName: ${AWS_REGION_NAME} - logging: level: org: @@ -81,15 +66,15 @@ spring: on-profile: test datasource: - url: jdbc:tc:mysql:8.0.36:///nutridiary?TC_DAEMON=true - - main: - allow-bean-definition-overriding: true - + url: jdbc:h2:mem:nutridiary + username: sa + password: + driver-class-name: org.h2.Driver sql: init: mode: always schema-locations: classpath:db/schema.sql +# data-locations: optional:classpath:db/data.sql logging: level: @@ -103,3 +88,18 @@ spring: config: activate: on-profile: common + + datasource: + hikari: + maximum-pool-size: 10 # 커넥션 풀의 최대 크기 설정 + max-lifetime: 55000 # 커넥션 최대 생존 시간 설정 (ms) 55초 + connection-timeout: 30000 # pool 에서 커넥션을 받기위해 대기하는 시간 (ms) + data-source-properties: + socketTimeout: 30 + +cloud: + aws: + s3: + endpoint: ${S3_END_POINT} + bucketName: ${S3_BUCKET_NAME} + regionName: ${AWS_REGION_NAME} \ No newline at end of file