Skip to content

Instantly share code, notes, and snippets.

@baso53
Last active November 13, 2021 21:31
Show Gist options
  • Save baso53/470df6ff1c6edc47b87afb214c91c2fc to your computer and use it in GitHub Desktop.
Save baso53/470df6ff1c6edc47b87afb214c91c2fc to your computer and use it in GitHub Desktop.
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable();
http.oauth2ResourceServer()
.jwt();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment