diff --git a/src/main/java/com/rest/api/config/security/SecurityConfiguration.java b/src/main/java/com/rest/api/config/security/SecurityConfiguration.java index fb46575..3bcc208 100644 --- a/src/main/java/com/rest/api/config/security/SecurityConfiguration.java +++ b/src/main/java/com/rest/api/config/security/SecurityConfiguration.java @@ -32,7 +32,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { .and() .authorizeRequests() // 다음 리퀘스트에 대한 사용권한 체크 .antMatchers("/*/signin", "/*/signin/**", "/*/signup", "/*/signup/**", "/social/**").permitAll() // 가입 및 인증 주소는 누구나 접근가능 - .antMatchers(HttpMethod.GET, "/exception/**", "/helloworld/**","/actuator/health", "/v1/board/**").permitAll() // hellowworld로 시작하는 GET요청 리소스는 누구나 접근가능 + .antMatchers(HttpMethod.GET, "/exception/**", "/helloworld/**","/actuator/health", "/v1/board/**", "/favicon.ico").permitAll() // 등록한 GET요청 리소스는 누구나 접근가능 .anyRequest().hasRole("USER") // 그외 나머지 요청은 모두 인증된 회원만 접근 가능 .and() .exceptionHandling().accessDeniedHandler(new CustomAccessDeniedHandler()) diff --git a/src/main/java/com/rest/api/controller/HelloController.java b/src/main/java/com/rest/api/controller/HelloController.java index ed5538d..3ed6260 100644 --- a/src/main/java/com/rest/api/controller/HelloController.java +++ b/src/main/java/com/rest/api/controller/HelloController.java @@ -15,7 +15,7 @@ public class HelloController { @Setter @Getter - public static class Hello { + private static class Hello { private String message; } @@ -37,7 +37,7 @@ public class HelloController { @GetMapping(value = "/helloworld/page") public String helloworld() { - return HELLO; + return "helloworld"; } @GetMapping("/helloworld/long-process")