Skip to content

Instantly share code, notes, and snippets.

@GHGHGHKO
Created February 23, 2023 13:05
Show Gist options
  • Select an option

  • Save GHGHGHKO/3e8135e11bde6b205f2f9b1594c4cc28 to your computer and use it in GitHub Desktop.

Select an option

Save GHGHGHKO/3e8135e11bde6b205f2f9b1594c4cc28 to your computer and use it in GitHub Desktop.
SecurityConfig filterChain
.requestMatchers("/users/**").hasRole("ADMIN")
.anyRequest().hasRole("USER")
.and()
.exceptionHandling().accessDeniedHandler(accessDeniedHandlerCustom)
.and()
.exceptionHandling().authenticationEntryPoint(authenticationEntryPointCustom)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment