diff --git a/src/main/java/org/sopt/makers/internal/config/SecurityConfig.java b/src/main/java/org/sopt/makers/internal/config/SecurityConfig.java index f9d12471..4d731c7a 100644 --- a/src/main/java/org/sopt/makers/internal/config/SecurityConfig.java +++ b/src/main/java/org/sopt/makers/internal/config/SecurityConfig.java @@ -4,7 +4,7 @@ import lombok.val; import org.sopt.makers.internal.controller.filter.JwtAuthenticationFilter; import org.sopt.makers.internal.controller.filter.JwtExceptionFilter; -import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; @@ -23,12 +23,13 @@ public class SecurityConfig { private final JwtAuthenticationFilter jwtAuthenticationFilter; private final JwtExceptionFilter jwtExceptionFilter; + private final WebEndpointProperties webEndpointProperties; - @Value("${management.endpoints.web.base-path}") - private String actuatorEndpoint; @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { + String actuatorEndpoint = webEndpointProperties.getBasePath(); + return http.antMatcher("/**") .httpBasic().disable() .formLogin().disable() diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 3f85fb4f..8641629f 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -100,7 +100,7 @@ push-notification: action: test x-api-key: test service: test - + crew: server-url: test @@ -112,8 +112,3 @@ gabia: sms-id: test api-key: test send-number: test - -management: - endpoints: - web: - base-path: test diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml index fe535717..5d7c3b30 100644 --- a/src/test/resources/application.yml +++ b/src/test/resources/application.yml @@ -109,8 +109,3 @@ gabia: sms-id: test api-key: test send-number: test - -management: - endpoints: - web: - base-path: test