{"action":"created","issue":{"url":"https://api.github.com/repos/grails/grails-core/issues/9092","labels_url":"https://api.github.com/repos/grails/grails-core/issues/9092/labels{/name}","comments_url":"https://api.github.com/repos/grails/grails-core/issues/9092/comments","events_url":"https://api.github.com/repos/grails/grails-core/issues/9092/events","html_url":"https://github.com/grails/grails-core/issues/9092","id":93999517,"number":9092,"title":"spring method security is not working with grails 3.0.2","user":{"login":"akistanov","id":2842191,"avatar_url":"https://avatars.githubusercontent.com/u/2842191?v=3","gravatar_id":"","url":"https://api.github.com/users/akistanov","html_url":"https://github.com/akistanov","followers_url":"https://api.github.com/users/akistanov/followers","following_url":"https://api.github.com/users/akistanov/following{/other_user}","gists_url":"https://api.github.com/users/akistanov/gists{/gist_id}","starred_url":"https://api.github.com/users/akistanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akistanov/subscriptions","organizations_url":"https://api.github.com/users/akistanov/orgs","repos_url":"https://api.github.com/users/akistanov/repos","events_url":"https://api.github.com/users/akistanov/events{/privacy}","received_events_url":"https://api.github.com/users/akistanov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/grails/grails-core/milestones/136","html_url":"https://github.com/grails/grails-core/milestones/grails-3.0.3","labels_url":"https://api.github.com/repos/grails/grails-core/milestones/136/labels","id":1164609,"number":136,"title":"grails-3.0.3","description":"","creator":{"login":"graemerocher","id":66626,"avatar_url":"https://avatars.githubusercontent.com/u/66626?v=3","gravatar_id":"","url":"https://api.github.com/users/graemerocher","html_url":"https://github.com/graemerocher","followers_url":"https://api.github.com/users/graemerocher/followers","following_url":"https://api.github.com/users/graemerocher/following{/other_user}","gists_url":"https://api.github.com/users/graemerocher/gists{/gist_id}","starred_url":"https://api.github.com/users/graemerocher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graemerocher/subscriptions","organizations_url":"https://api.github.com/users/graemerocher/orgs","repos_url":"https://api.github.com/users/graemerocher/repos","events_url":"https://api.github.com/users/graemerocher/events{/privacy}","received_events_url":"https://api.github.com/users/graemerocher/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":31,"state":"open","created_at":"2015-06-15T10:00:25Z","updated_at":"2015-07-09T09:37:43Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-07-09T09:22:44Z","updated_at":"2015-07-09T09:37:43Z","closed_at":"2015-07-09T09:37:43Z","body":"In grails 3.0.2 project with spring-security when turn on method security adding `@EnableGlobalMethodSecurity(prePostEnabled = true)` annotation to `SecurityConfiguration` class\r\napplication failed to start with error:\r\n`\r\nERROR grails.boot.GrailsApp - Application startup failed\r\njava.lang.IllegalArgumentException: Class name [org.grails.spring.aop.autoproxy.GroovyAwareAspectJAwareAdvisorAutoProxyCreator] is not a known auto-proxy creator class\r\nat org.springframework.aop.config.AopConfigUtils.findPriorityForClass(AopConfigUtils.java:140) ~[spring-aop-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\n...\r\n`\r\nPossible workaround is described here: https://groups.google.com/forum/#!topic/grails-dev-discuss/hr1skz1RaZo\r\n\r\nIt adds `GroovyAwareAspectJAwareAdvisorAutoProxyCreator` to `AopConfigUtils` with Java Reflection, but after this fix new error will appear:\r\n`\r\nERROR grails.boot.GrailsApp - Application startup failed\r\n...\r\norg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'metaDataSourceAdvisor' defined in class path resource [org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.access.intercept.aopalliance.MethodSecurityMetadataSourceAdvisor]: Factory method 'metaDataSourceAdvisor' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'methodSecurityMetadataSource' defined in class path resource [org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.access.method.MethodSecurityMetadataSource]: Factory method 'methodSecurityMetadataSource' threw exception; nested exception is java.lang.IllegalArgumentException: org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity is `"},"comment":{"url":"https://api.github.com/repos/grails/grails-core/issues/comments/119890276","html_url":"https://github.com/grails/grails-core/issues/9092#issuecomment-119890276","issue_url":"https://api.github.com/repos/grails/grails-core/issues/9092","id":119890276,"user":{"login":"graemerocher","id":66626,"avatar_url":"https://avatars.githubusercontent.com/u/66626?v=3","gravatar_id":"","url":"https://api.github.com/users/graemerocher","html_url":"https://github.com/graemerocher","followers_url":"https://api.github.com/users/graemerocher/followers","following_url":"https://api.github.com/users/graemerocher/following{/other_user}","gists_url":"https://api.github.com/users/graemerocher/gists{/gist_id}","starred_url":"https://api.github.com/users/graemerocher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graemerocher/subscriptions","organizations_url":"https://api.github.com/users/graemerocher/orgs","repos_url":"https://api.github.com/users/graemerocher/repos","events_url":"https://api.github.com/users/graemerocher/events{/privacy}","received_events_url":"https://api.github.com/users/graemerocher/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T09:37:43Z","updated_at":"2015-07-09T09:37:43Z","body":"This was fixed by https://github.com/grails/grails-core/commit/08fb70ee3a9223f68b5acca435eee3ca76e9b8cd"}}