From a85ed2a51a3cbdd8e01a9d03d8b98c839787d62e Mon Sep 17 00:00:00 2001 From: kwonjoosung Date: Fri, 27 Jan 2023 17:20:17 +0900 Subject: [PATCH 1/2] =?UTF-8?q?add:=20actuator=20=EC=9D=98=EC=A1=B4?= =?UTF-8?q?=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - include all --- build.gradle | 1 + src/main/resources/application.yml | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index bc3eb5d..83966f9 100644 --- a/build.gradle +++ b/build.gradle @@ -44,6 +44,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' // OAuth2-Client dependency + implementation 'org.springframework.boot:spring-boot-starter-actuator' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 154a7c6..46f82d0 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -11,4 +11,10 @@ spring: include: - db - exception - - security \ No newline at end of file + - security + +management: + endpoints: + web: + exposure: + include: '*' \ No newline at end of file From d0b3fe1f77e39774bde40999ebdc9c879a15191b Mon Sep 17 00:00:00 2001 From: kwonjoosung Date: Fri, 27 Jan 2023 17:32:53 +0900 Subject: [PATCH 2/2] =?UTF-8?q?config:=20=EC=8B=9C=ED=81=90=EB=A6=AC?= =?UTF-8?q?=ED=8B=B0=20=EB=B3=B4=EC=95=88=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/prgrms/prolog/global/config/SecurityConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/prgrms/prolog/global/config/SecurityConfig.java b/src/main/java/com/prgrms/prolog/global/config/SecurityConfig.java index c830202..9c7f933 100644 --- a/src/main/java/com/prgrms/prolog/global/config/SecurityConfig.java +++ b/src/main/java/com/prgrms/prolog/global/config/SecurityConfig.java @@ -34,6 +34,7 @@ protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers("/docs/**").permitAll() + .antMatchers("/actuator/**").hasRole("USER") .anyRequest().authenticated() .and() // REST API 기반이기 때문에 사용 X