diff --git a/build.gradle b/build.gradle index 2b63f213..6075825a 100644 --- a/build.gradle +++ b/build.gradle @@ -32,15 +32,14 @@ subprojects { dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-actuator' + runtimeOnly 'io.micrometer:micrometer-registry-prometheus' // redis 사용간 localdatetime json 직렬화 위해 implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1' - // swagger( auth, external dto가 문서화되지 않아서 임시로 프로젝트 전체에 추가 implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - // lombok compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' diff --git a/genti-auth/src/main/java/com/gt/genti/config/SecurityConfig.java b/genti-auth/src/main/java/com/gt/genti/config/SecurityConfig.java index 040eca7a..0ca3cf04 100644 --- a/genti-auth/src/main/java/com/gt/genti/config/SecurityConfig.java +++ b/genti-auth/src/main/java/com/gt/genti/config/SecurityConfig.java @@ -74,7 +74,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .authorizeHttpRequests(authorizationManagerRequestMatcherRegistry -> authorizationManagerRequestMatcherRegistry .requestMatchers("/auth/v1/logout").authenticated() - .requestMatchers(whiteListConstants.getSecurtiyWhiteArray()).permitAll()) + .requestMatchers(whiteListConstants.getSecurityWhiteArray()).permitAll()) .authorizeHttpRequests(authorizationManagerRequestMatcherRegistry -> authorizationManagerRequestMatcherRegistry .requestMatchers("/api/*/users/**").hasAuthority(UserRole.USER.getAuthority()) diff --git a/genti-common/src/main/java/com/gt/genti/constants/WhiteListConstants.java b/genti-common/src/main/java/com/gt/genti/constants/WhiteListConstants.java index f54876ea..b4167f79 100644 --- a/genti-common/src/main/java/com/gt/genti/constants/WhiteListConstants.java +++ b/genti-common/src/main/java/com/gt/genti/constants/WhiteListConstants.java @@ -1,5 +1,6 @@ package com.gt.genti.constants; +import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Value; @@ -16,16 +17,17 @@ public class WhiteListConstants { @Getter private String[] filterWhiteArray; @Getter - private String[] securtiyWhiteArray; + private String[] securityWhiteArray; + @PostConstruct void postConstruct() { this.filterWhiteList.add(monitoringPath + "/**"); this.securityWhiteList.add(monitoringPath + "/**"); filterWhiteArray = filterWhiteList.toArray(String[]::new); - securtiyWhiteArray = securityWhiteList.toArray(String[]::new); + securityWhiteArray = securityWhiteList.toArray(String[]::new); } - private List filterWhiteList = List.of( + private List filterWhiteList = new ArrayList<>(List.of( "/favicon.ico", "/error", "/auth/**", @@ -38,9 +40,9 @@ void postConstruct() { "/v3/api-docs/**", "/h2-console/**", "/h2-console" - ); + )); - private List securityWhiteList = List.of( + private List securityWhiteList = new ArrayList<>(List.of( "/favicon.ico", "/error", "/auth/**", @@ -53,8 +55,5 @@ void postConstruct() { "/v3/api-docs/**", "/h2-console/**", "/h2-console" - ); - - - + )); }