Skip to content

Commit

Permalink
[Feat] : spring actuator를 위한 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ReadMyMemory committed Oct 13, 2024
1 parent 1a35ecf commit 51e2ca8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ jobs:
spring.cloud.aws.region.static=${{ secrets.AWS_REGION_FOR_IMAGE_UPLOAD }}
aws.s3.bucket=${{ secrets.AWS_S3_BUCKET_NAME_FOR_IMAGE_UPLOAD }}
aws.s3.file.max-size=${{ secrets.AWS_S3_FILE_MAX_SIZE_FOR_IMAGE_UPLOAD }}
management.endpoints.web.exposure.include=${{ secrets.enable_actuator_endpoints }}
management.server.port = ${{ secrets.actuator_port }}
web_enable_endpoint1=${{ secrets.web_enable_endpoint1 }}
web_enable_endpoint2=${{ secrets.web_enable_endpoint2 }}
management.endpoints.web.base-path = ${{ secrets.actuator_base_path }}
EOF
- name: Grant execute permission for gradlew
Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ dependencies {
//AWS S3 이미지 업로드 관련
implementation 'io.awspring.cloud:spring-cloud-aws-starter-s3'
implementation(platform("io.awspring.cloud:spring-cloud-aws-dependencies:3.0.2"))
// implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'
//모니터링 관련
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-registry-prometheus'


}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,18 @@ public CorsConfiguration getCorsConfiguration(HttpServletRequest request) {
return http.build();
}

//로그인 여부 체크에 한해서만, springSecurity 필터 거치지 않도록 해결.
@Value("${web_enable_endpoint1}")
String url3;

@Value("${web_enable_endpoint2}")
String url4;
@Bean
public WebSecurityCustomizer webSecurityCustomizer() {
return web -> {
web.ignoring()
.requestMatchers(
"/api/isLogin"
"url3",
"url4"
);
};
}
Expand Down

0 comments on commit 51e2ca8

Please sign in to comment.