Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Configuration
- public class SecurityConfig extends WebSecurityConfigurerAdapter {
- @Override
- protected void configure(HttpSecurity http) throws Exception {
- http
- .httpBasic()
- .and()
- .authorizeRequests().antMatchers("/secret/**").authenticated()
- .and()
- .authorizeRequests().antMatchers("/**").permitAll();
- }
- @Override
- public void configure(WebSecurity web) throws Exception {
- web.ignoring().antMatchers("/resources/**");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement