From 32692d0b7a677b6fb3925dfa740df507307bb727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=95=9C=EC=9A=B0=EC=84=9D?= <106640954+drunkenhw@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:09:43 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=8A=A4=EC=BC=80=EC=A4=84=EB=A7=81?= =?UTF-8?q?=EC=9D=84=20profile=EC=97=90=20=EB=94=B0=EB=9D=BC=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC=ED=95=9C=EB=8B=A4=20(#334)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 스케줄링을 production 서버에만 사용하도록 변경 [#333] * feat: 처음 scrap을 production 서버에만 사용하도록 변경 [#333] * feat: 처음 scrap을 production 서버에만 사용하도록 변경 [#333] * feat: scheduling 분리 [#333] --- .../carffeine/carffeine/config/SchedulingConfig.java | 2 ++ backend/src/main/resources/application-dev.yml | 6 ++++++ backend/src/main/resources/application-local.yml | 11 +++++------ backend/src/main/resources/application-prod.yml | 6 ++++++ backend/src/main/resources/application.yml | 3 --- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/backend/src/main/java/com/carffeine/carffeine/config/SchedulingConfig.java b/backend/src/main/java/com/carffeine/carffeine/config/SchedulingConfig.java index 5a39301c6..711c38f5e 100644 --- a/backend/src/main/java/com/carffeine/carffeine/config/SchedulingConfig.java +++ b/backend/src/main/java/com/carffeine/carffeine/config/SchedulingConfig.java @@ -1,8 +1,10 @@ package com.carffeine.carffeine.config; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.stereotype.Component; +@ConditionalOnProperty(name = "scheduling.enabled", havingValue = "true") @EnableScheduling @Component public class SchedulingConfig { diff --git a/backend/src/main/resources/application-dev.yml b/backend/src/main/resources/application-dev.yml index 4e2e91c2f..4a8eb5e60 100644 --- a/backend/src/main/resources/application-dev.yml +++ b/backend/src/main/resources/application-dev.yml @@ -9,3 +9,9 @@ spring: hibernate: ddl-auto: update database-platform: org.hibernate.dialect.MySQL5InnoDBDialect + +initialize-charge: + enabled: false + +scheduling: + enabled: false diff --git a/backend/src/main/resources/application-local.yml b/backend/src/main/resources/application-local.yml index 92c58bf32..0037d4623 100644 --- a/backend/src/main/resources/application-local.yml +++ b/backend/src/main/resources/application-local.yml @@ -1,5 +1,4 @@ spring: - datasource: url: jdbc:mysql://localhost:13306/charge?useSSL=false&serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true username: root @@ -10,9 +9,9 @@ spring: hibernate: ddl-auto: update database-platform: org.hibernate.dialect.MySQL5InnoDBDialect - properties: - hibernate: - show_sql: true - format_sql: true - use_sql_comments: true +initialize-charge: + enabled: false + +scheduling: + enabled: true diff --git a/backend/src/main/resources/application-prod.yml b/backend/src/main/resources/application-prod.yml index 419d904a9..29912b051 100644 --- a/backend/src/main/resources/application-prod.yml +++ b/backend/src/main/resources/application-prod.yml @@ -9,3 +9,9 @@ spring: hibernate: ddl-auto: update database-platform: org.hibernate.dialect.MySQL5InnoDBDialect + +initialize-charge: + enabled: true + +scheduling: + enabled: true diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index b0547a65d..2c23b5273 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -18,9 +18,6 @@ api: service_key: ENC(EnFwYm2ZuLwCTIgLIiqtqqw+IdtZ4UNb2GiNWl9s46gDk2SaEu7U5XfJuijkLufufXbUwIaSsCAiG3UpbtamTRwXvebdQDHLo6Y7lPRQ4L3d+Q2m24E/Btg83V68kCu9RFpzf/6/3u+6Wl961HeZiIDdL255xcbkZlKxWy4jVELkONxUWz9awzQuJw2CwsNv4WkK5TMk4gxQTh8ZJUDyQEqmUgGtLcH+edtOnFu9IIjgLX3CvCe+7Kxv4WtP3nRlGsg+/Xbxck6mmoqdqXWppeXF0zVBOwsnr4vtWRGM/1PD6rJvQN9hnWQmW0IE3x5NDM/usDkdBMhBDmtbtpmxibbXTSc58A/idDOcUwlZrbLx89OppXNcIDYIn6iMyf3Fo6/sYMSt1YJqC1WxlkKjLqs69bZtjF5TkBHFOneAV4vHo8/2g0V/FauNYPry2FULsbgeAO2w1K1OTey+pa4DjXoLmhmfK6VEFlf2NJhAlqTPDJakfwtb8yheLVuRIqtyBaMwWtrzYdON4G/d03vvjGskqP/h5UXGwkJGpS6u+Gdcxjvs2/IfB1FO1dNA2QTr7m2wWcyAaIG6MrUtZM9Hp5qu7VvqCnK8TNrhBUoqLA1fNs6Xy6kVYhOMXqer1sGs6svoFOuu2zIPUmb+OcKWTQv9d/HgcrFtJrP/gmkYsdOUDpKCWqzIjz6KvSui3cbIAlPTgpJsbN/yTe9RU10D8kGSDcXcR75W+LtRj4Xl1Vd33ElMZ5brCdAy7dPyFo0jcUH7AWa713HTmUk6ZH0BLoeyW8tAbKpI/vUR0mbIxx7JWAFQ4hok5f4xkoXbCGoQtSvZUI8ZB9A=) -initialize-charge: - enabled: true - management: endpoints: web: