From f1d62bd78a4c7625d0eab0cdf6d6dd7530d63987 Mon Sep 17 00:00:00 2001 From: belljun3395 <195850@jnu.ac.kr> Date: Fri, 13 Dec 2024 15:34:41 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=88=98?= =?UTF-8?q?=ED=96=89=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/src/test/resources/application-test.yml | 12 ++++++------ .../kotlin/web/security/config/WebSecurityConfig.kt | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/api/src/test/resources/application-test.yml b/api/src/test/resources/application-test.yml index b0aee2ece..bbd73bb80 100644 --- a/api/src/test/resources/application-test.yml +++ b/api/src/test/resources/application-test.yml @@ -69,12 +69,6 @@ thread-pool: await-termination-seconds: 60 security: - jwt: - token: - validtime: - access: 31557600000 - refresh: 31557600000 - secretkey: jwtsecretKeyhastolonghowlongidontknow encryption: algorithm: AES secretKey: encryptionsecret @@ -92,6 +86,12 @@ web: exposed-headers: "Set-Cookie, Authorization, Content-Type, X-Requested-With, Accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Access-Control-Allow-Origin, Access-Control-Allow-Credentials" allow-credentials: true max-age: 1800 + jwt: + token: + validtime: + access: 31557600000 + refresh: 31557600000 + secretkey: jwtsecretKeyhastolonghowlongidontknow client: timeout: connect: 5000 diff --git a/web/src/main/kotlin/web/security/config/WebSecurityConfig.kt b/web/src/main/kotlin/web/security/config/WebSecurityConfig.kt index 80d3b7877..f7d81da28 100644 --- a/web/src/main/kotlin/web/security/config/WebSecurityConfig.kt +++ b/web/src/main/kotlin/web/security/config/WebSecurityConfig.kt @@ -129,6 +129,7 @@ class WebSecurityConfig { return SecurityTokenResolver(secretKey) } + @Profile("!test") @Bean(name = [TOKEN_USER_DETAILS_SERVICE]) fun tokenUserDetailsService(tokenResolver: TokenResolver): UserDetailsService { return TokenUserDetailsService(tokenResolver)