Guest User

Untitled

a guest
Jun 25th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. @Configuration
  2. @EnableWebSecurity
  3. public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
  4.  
  5. .
  6. .
  7. .
  8. .
  9. //other stuff
  10. .
  11. .
  12. .
  13. .
  14.  
  15. @Override
  16. protected void configure(HttpSecurity http) throws Exception {
  17.  
  18. //other stuff
  19. //other stuff
  20. //other stuff
  21.  
  22. http.authorizeRequests().antMatchers("url/i/want/to/manage").access("ROLE_FOR_THAT_URL");
  23.  
  24. //other stuff
  25. //other stuff
  26. //other stuff
  27. }
Add Comment
Please, Sign In to add comment