Skip to content

Commit

Permalink
Fix: promethues 의존성 추가, 오타 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
BYEONGRYEOL committed Aug 6, 2024
1 parent 6fc7fcf commit 697b13e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.gt.genti.constants;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Value;
Expand All @@ -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<String> filterWhiteList = List.of(
private List<String> filterWhiteList = new ArrayList<>(List.of(
"/favicon.ico",
"/error",
"/auth/**",
Expand All @@ -38,9 +40,9 @@ void postConstruct() {
"/v3/api-docs/**",
"/h2-console/**",
"/h2-console"
);
));

private List<String> securityWhiteList = List.of(
private List<String> securityWhiteList = new ArrayList<>(List.of(
"/favicon.ico",
"/error",
"/auth/**",
Expand All @@ -53,8 +55,5 @@ void postConstruct() {
"/v3/api-docs/**",
"/h2-console/**",
"/h2-console"
);



));
}

0 comments on commit 697b13e

Please sign in to comment.