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 |
Tags
- map
- JavaScript
- 스프링부트
- gitlab
- SpringBoot
- jQuery
- Spring Cloud
- 스프링
- 비동기
- GIT
- Spring
- date
- STS
- 자바스크립트
- 프로그래머스
- spring boot
- map()
- OAuth
- 스프링 클라우드
- spring security
- 유레카
- docker
- leetcode
- IntelliJ
- 자바
- EUREKA
- 도커
- 코딩테스트
- JS
- Java
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()
'DEV > SPRING' 카테고리의 다른 글
Comments