From cf5261c5080d715a1488926e8508119aa61f0c3e Mon Sep 17 00:00:00 2001 From: yeseul106 <20191037@sungshin.ac.kr> Date: Wed, 5 Jun 2024 02:59:27 +0900 Subject: [PATCH 1/2] =?UTF-8?q?#263=20[chore]=20Legacy=20Url=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=EC=BD=94=EB=93=9C=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operation/config/SecurityConfig.java | 6 +- .../makers/operation/config/ValueConfig.java | 136 +++++++++--------- 2 files changed, 67 insertions(+), 75 deletions(-) diff --git a/operation-auth/src/main/java/org/sopt/makers/operation/config/SecurityConfig.java b/operation-auth/src/main/java/org/sopt/makers/operation/config/SecurityConfig.java index cd21f2fb..86d20e21 100644 --- a/operation-auth/src/main/java/org/sopt/makers/operation/config/SecurityConfig.java +++ b/operation-auth/src/main/java/org/sopt/makers/operation/config/SecurityConfig.java @@ -64,8 +64,8 @@ private void setHttp(HttpSecurity http) throws Exception { .anyRequest().authenticated()) .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() - .addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class) - .addFilterBefore(jwtExceptionFilter, JwtAuthenticationFilter.class); + .addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class) + .addFilterBefore(jwtExceptionFilter, JwtAuthenticationFilter.class); } @Bean @@ -74,8 +74,6 @@ public CorsConfigurationSource corsConfigurationSource() { configuration.addAllowedOrigin(valueConfig.getADMIN_PROD_URL()); configuration.addAllowedOrigin(valueConfig.getADMIN_DEV_URL()); - configuration.addAllowedOrigin(valueConfig.getADMIN_PROD_URL_LEGACY()); - configuration.addAllowedOrigin(valueConfig.getADMIN_DEV_URL_LEGACY()); configuration.addAllowedOrigin(valueConfig.getADMIN_LOCAL_URL()); configuration.addAllowedHeader("*"); configuration.addAllowedMethod("*"); diff --git a/operation-common/src/main/java/org/sopt/makers/operation/config/ValueConfig.java b/operation-common/src/main/java/org/sopt/makers/operation/config/ValueConfig.java index ab98dcb7..2434feb4 100644 --- a/operation-common/src/main/java/org/sopt/makers/operation/config/ValueConfig.java +++ b/operation-common/src/main/java/org/sopt/makers/operation/config/ValueConfig.java @@ -2,84 +2,78 @@ import java.util.Arrays; import java.util.List; - +import lombok.Getter; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; -import lombok.Getter; - @Configuration @Getter public class ValueConfig { - @Value("${sopt.alarm.message.title_end}") - private String ALARM_MESSAGE_TITLE; - @Value("${sopt.alarm.message.content_end}") - private String ALARM_MESSAGE_CONTENT; - @Value("${sopt.current.generation}") - private int GENERATION; - @Value("${admin.url.prod}") - private String ADMIN_PROD_URL; - @Value("${admin.url.dev}") - private String ADMIN_DEV_URL; - @Value("${admin.url.prod_legacy}") - private String ADMIN_PROD_URL_LEGACY; - @Value("${admin.url.dev_legacy}") - private String ADMIN_DEV_URL_LEGACY; - @Value("${admin.url.local}") - private String ADMIN_LOCAL_URL; - @Value("${notification.key}") - private String NOTIFICATION_KEY; - @Value("${notification.url}") - private String NOTIFICATION_URL; - @Value("${sopt.makers.playground.server}") - private String playGroundURI; - @Value("${sopt.makers.playground.token}") - private String playGroundToken; - @Value("${oauth.apple.key.id}") - private String appleKeyId; - @Value("${oauth.apple.key.path}") - private String appleKeyPath; - @Value("${oauth.apple.team.id}") - private String appleTeamId; - @Value("${oauth.apple.aud}") - private String appleAud; - @Value("${oauth.apple.sub}") - private String appleSub; - @Value("${oauth.google.client.id}") - private String googleClientId; - @Value("${oauth.google.client.secret}") - private String googleClientSecret; - @Value("${oauth.google.redirect.url}") - private String googleRedirectUrl; - @Value("${spring.jwt.secretKey.platform_code}") - private String platformCodeSecretKey; + @Value("${sopt.alarm.message.title_end}") + private String ALARM_MESSAGE_TITLE; + @Value("${sopt.alarm.message.content_end}") + private String ALARM_MESSAGE_CONTENT; + @Value("${sopt.current.generation}") + private int GENERATION; + @Value("${admin.url.prod}") + private String ADMIN_PROD_URL; + @Value("${admin.url.dev}") + private String ADMIN_DEV_URL; + @Value("${admin.url.local}") + private String ADMIN_LOCAL_URL; + @Value("${notification.key}") + private String NOTIFICATION_KEY; + @Value("${notification.url}") + private String NOTIFICATION_URL; + @Value("${sopt.makers.playground.server}") + private String playGroundURI; + @Value("${sopt.makers.playground.token}") + private String playGroundToken; + @Value("${oauth.apple.key.id}") + private String appleKeyId; + @Value("${oauth.apple.key.path}") + private String appleKeyPath; + @Value("${oauth.apple.team.id}") + private String appleTeamId; + @Value("${oauth.apple.aud}") + private String appleAud; + @Value("${oauth.apple.sub}") + private String appleSub; + @Value("${oauth.google.client.id}") + private String googleClientId; + @Value("${oauth.google.client.secret}") + private String googleClientSecret; + @Value("${oauth.google.redirect.url}") + private String googleRedirectUrl; + @Value("${spring.jwt.secretKey.platform_code}") + private String platformCodeSecretKey; - private final int SUB_LECTURE_MAX_ROUND = 2; - private final int MAX_LECTURE_COUNT = 2; - private final String ETC_MESSAGE = "출석 점수가 반영되지 않아요."; - private final String SEMINAR_MESSAGE = ""; - private final String EVENT_MESSAGE = "행사도 참여하고, 출석점수도 받고, 일석이조!"; - private final String SWAGGER_URI = "/swagger-ui/**"; - private final int ATTENDANCE_MINUTE = 10; - private final int MIN_SCHEDULE_DURATION = 1; - private final int MAX_SCHEDULE_DURATION = 50; - private final int DAY_DURATION = 1; - private final int TWO_DAYS_DURATION = 2; - private final int HACKATHON_LECTURE_START_HOUR = 16; + private final int SUB_LECTURE_MAX_ROUND = 2; + private final int MAX_LECTURE_COUNT = 2; + private final String ETC_MESSAGE = "출석 점수가 반영되지 않아요."; + private final String SEMINAR_MESSAGE = ""; + private final String EVENT_MESSAGE = "행사도 참여하고, 출석점수도 받고, 일석이조!"; + private final String SWAGGER_URI = "/swagger-ui/**"; + private final int ATTENDANCE_MINUTE = 10; + private final int MIN_SCHEDULE_DURATION = 1; + private final int MAX_SCHEDULE_DURATION = 50; + private final int DAY_DURATION = 1; + private final int TWO_DAYS_DURATION = 2; + private final int HACKATHON_LECTURE_START_HOUR = 16; - private final List APP_LINK_LIST = Arrays.asList( - "home", - "home/notification", - "home/mypage", - "home/attendance", - "home/attendance/attendance-modal", - "home/soptamp", - "home/soptamp/entire-ranking", - "home/soptamp/current-generation-ranking" - ); - private final List WEB_LINK_LIST = Arrays.asList( - "https://playground.sopt.org/members", - "https://playground.sopt.org/group" - ); + private final List APP_LINK_LIST = Arrays.asList( + "home", + "home/notification", + "home/mypage", + "home/attendance", + "home/attendance/attendance-modal", + "home/soptamp", + "home/soptamp/entire-ranking", + "home/soptamp/current-generation-ranking" + ); + private final List WEB_LINK_LIST = Arrays.asList( + "https://playground.sopt.org/members", + "https://playground.sopt.org/group" + ); } From 793906ce7c607e59611e9e34dc409aa7fcefc4d4 Mon Sep 17 00:00:00 2001 From: yeseul106 <20191037@sungshin.ac.kr> Date: Thu, 6 Jun 2024 17:31:39 +0900 Subject: [PATCH 2/2] =?UTF-8?q?#263=20[chore]=20=EB=88=84=EB=9D=BD?= =?UTF-8?q?=EB=90=9C=20Table=20annotation=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sopt/makers/operation/auth/domain/TeamOAuthInfo.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/operation-domain/src/main/java/org/sopt/makers/operation/auth/domain/TeamOAuthInfo.java b/operation-domain/src/main/java/org/sopt/makers/operation/auth/domain/TeamOAuthInfo.java index fd8de518..7a7d2d19 100644 --- a/operation-domain/src/main/java/org/sopt/makers/operation/auth/domain/TeamOAuthInfo.java +++ b/operation-domain/src/main/java/org/sopt/makers/operation/auth/domain/TeamOAuthInfo.java @@ -1,15 +1,17 @@ package org.sopt.makers.operation.auth.domain; +import static jakarta.persistence.GenerationType.IDENTITY; + import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.EnumType; import jakarta.persistence.Enumerated; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; - -import static jakarta.persistence.GenerationType.IDENTITY; +import jakarta.persistence.Table; @Entity +@Table(name = "team_oauth_info") public class TeamOAuthInfo { @Id