Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- date
- 스프링
- 자바스크립트
- 스프링부트
- Java
- Spring
- OAuth
- jQuery
- 비동기
- 스프링 클라우드
- SpringBoot
- docker
- map
- map()
- 유레카
- EUREKA
- STS
- leetcode
- JavaScript
- IntelliJ
- Spring Cloud
- GIT
- 도커
- 자바
- spring security
- 코딩테스트
- gitlab
- spring boot
- JS
- 프로그래머스
Archives
- Today
- Total
RATSENO
Spring Securtiy 정적 자원 접근 허용 본문
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.requestMatchers(PathRequest.toStaticResources().atCommonLocations()).permitAll()
.requestMatchers().hasAnyRole("ADMIN").antMatchers("/").permitAll()
.anyRequest().authenticated();
}
}
.requestMatchers(PathRequest.toStaticResources().atCommonLocations()).permitAll()