{"action":"opened","issue":{"url":"https://api.github.com/repos/spring-projects/spring-security/issues/3735","repository_url":"https://api.github.com/repos/spring-projects/spring-security","labels_url":"https://api.github.com/repos/spring-projects/spring-security/issues/3735/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-security/issues/3735/comments","events_url":"https://api.github.com/repos/spring-projects/spring-security/issues/3735/events","html_url":"https://github.com/spring-projects/spring-security/issues/3735","id":139202200,"number":3735,"title":"Simplify configuration MethodExpressionHandler for @EnableGlobalMethodSecurity","user":{"login":"mdeinum","id":606761,"avatar_url":"https://avatars.githubusercontent.com/u/606761?v=3","gravatar_id":"","url":"https://api.github.com/users/mdeinum","html_url":"https://github.com/mdeinum","followers_url":"https://api.github.com/users/mdeinum/followers","following_url":"https://api.github.com/users/mdeinum/following{/other_user}","gists_url":"https://api.github.com/users/mdeinum/gists{/gist_id}","starred_url":"https://api.github.com/users/mdeinum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdeinum/subscriptions","organizations_url":"https://api.github.com/users/mdeinum/orgs","repos_url":"https://api.github.com/users/mdeinum/repos","events_url":"https://api.github.com/users/mdeinum/events{/privacy}","received_events_url":"https://api.github.com/users/mdeinum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-08T07:28:29Z","updated_at":"2016-03-08T07:28:29Z","closed_at":null,"body":"Currently when we enable web security and have a class that extends `WebSecurityConfigurerAdapter` and we also want to use `@EnableGlobalMethodSecurity` with a customized `MethodExpressionHandler` we need to add an additional configuration class which extends `GlobalMethodSecurityConfiguration` which (at least I found) often leads to errors regarding that it cannot find an `AuthenticationManager`.\r\n\r\nIt would be nice if there would be an easier mechanism to extend/modify the security configuration for instance by using an `expression-handler-ref` on the annotation, just like with the namespace or maybe allowing something like a `GlobalMethodSecurityConfigurer` to exist to do additional configuration for some of the requested beans. \r\n\r\nAll in all I find the java config less intuitive than the XML configuration (I often revert to XML configuration for the ease of use, or maybe I just want more complex things which are easier to do in XML then in Java :) ). "}}