From 16ae0132d25dae7772cb4f4084ede3516c7f3899 Mon Sep 17 00:00:00 2001 From: kimyonghwa Date: Wed, 17 Apr 2019 19:26:52 +0900 Subject: [PATCH 1/2] modify security matcher path --- .../com/rest/api/config/security/SecurityConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 bf8923d..923854e 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", "/*/signup").permitAll() // 가입 및 인증 주소는 누구나 접근가능 - .antMatchers(HttpMethod.GET, "helloworld/**").permitAll() // hellowworld로 시작하는 GET요청 리소스는 누구나 접근가능 + .antMatchers(HttpMethod.GET, "/helloworld/**").permitAll() // hellowworld로 시작하는 GET요청 리소스는 누구나 접근가능 .antMatchers("/*/users").hasRole("ADMIN") .anyRequest().hasRole("USER") // 그외 나머지 요청은 모두 인증된 회원만 접근 가능 .and() From 62c14bb3bc958496d89f78217a9fe6d573411a4d Mon Sep 17 00:00:00 2001 From: kimyonghwa Date: Thu, 18 Apr 2019 15:23:57 +0900 Subject: [PATCH 2/2] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index badbe85..d08d331 100644 --- a/README.md +++ b/README.md @@ -62,4 +62,9 @@ - Document - https://daddyprogrammer.org/post/636/springboot2-springsecurity-authentication-authorization/ - Git - - https://github.com/codej99/SpringRestApi/tree/feature/security \ No newline at end of file + - https://github.com/codej99/SpringRestApi/tree/feature/security +- SpringBoot2로 Rest api 만들기(9) – Unit Test + - Document + - https://daddyprogrammer.org/post/938/springboot2-restapi-unit-test/ + - Git + - https://github.com/codej99/SpringRestApi/tree/feature/junit-test \ No newline at end of file