Spring Security, Method Security annotation (@Secured ) is not working (java config)
Kindly add this @EnableGlobalMethodSecurity(securedEnabled = true) This element is used to enable annotation-based security in your application (by setting the appropriate attributes on the element), and also to group together security pointcut declarations which will be applied across your entire application context specifically for @Secured. Hence your code should look like this @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(securedEnabled … Read more