Created
July 1, 2020 14:43
-
-
Save dsimonow/ace5ce36d44141fd709eead9caddac8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebSecurity | |
public class WebSecurityConfig extends WebSecurityConfigurerAdapter { | |
@Override | |
protected void configure(HttpSecurity http) throws Exception { | |
http | |
.authorizeRequests() | |
.antMatchers("/", "/aviav","/h2").permitAll() | |
.anyRequest().authenticated() | |
.and() | |
.formLogin() | |
.loginPage("/login") | |
.permitAll() | |
.and() | |
.logout() | |
.permitAll(); | |
http.csrf().disable(); | |
http.headers().frameOptions().disable(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment