Skip to content

Instantly share code, notes, and snippets.

@boudhayan-dev
Created May 1, 2021 17:08
Show Gist options
  • Save boudhayan-dev/69ffde0ae498fd665691576941e06ce5 to your computer and use it in GitHub Desktop.
Save boudhayan-dev/69ffde0ae498fd665691576941e06ce5 to your computer and use it in GitHub Desktop.
@Configuration
@EnableWebSecurity(debug = true)
public class SecurityConfiguration extends WebSecurityConfigurerAdapter{
@Override
protected void configure(HttpSecurity http) throws Exception {
http.sessionManagement().disable();
http.cors().disable();
http.csrf().disable();
http.logout().disable();
http.requestCache().disable();
http.authorizeRequests().antMatchers("api/v1/employee/**").permitAll();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment