--
You received this message because you are subscribed to a topic in the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grails-dev-discuss/hr1skz1RaZo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/40ce40fb-c59f-4b99-adf3-6b4ab9bf1416%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No, we ended up implementing an url based solution.
On Wed, May 6, 2015 at 7:11 AM Osaetin Evbuoma <osaetin...@gmail.com> wrote:
Where you able to get a solution to this problem?--
On Thursday, 19 March 2015 13:32:47 UTC+1, Rafael Felini wrote:Hi guys,I am trying to configure Spring Security via spring-boot-starter-security on Grails 3 and everything is going fine until I tried to enable @Secured annotations with @EnableGlobalMethodSecurity(securedEnabled = true) in my config class.After annotations are enabled this error come up:Exception in thread "main" java.lang.IllegalArgumentException: Class name [org.grails.spring.aop.autoproxy.GroovyAwareAspectJAwareAdvisorAutoProxyCreator] is not a known auto-proxy creator classat org.springframework.aop.config.AopConfigUtils.findPriorityForClass(AopConfigUtils.java:140)at org.springframework.aop.config.AopConfigUtils.registerOrEscalateApcAsRequired(AopConfigUtils.java:113)at org.springframework.aop.config.AopConfigUtils.registerAutoProxyCreatorIfNecessary(AopConfigUtils.java:74)Anyone has an idea of what it might be?I'm using Grails 3 RC 2 and Java 8.Thanks,Rafael
You received this message because you are subscribed to a topic in the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grails-dev-discuss/hr1skz1RaZo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grails-dev-discuss+unsub...@googlegroups.com.
class Application extends GrailsAutoConfiguration {
static void main(String[] args) {
Field field = AopConfigUtils.getDeclaredField("APC_PRIORITY_LIST")
field.setAccessible(true)
Object obj = field.get(null)
List<Class<?>> list = (List<Class<?>>) obj
list.add(GroovyAwareAspectJAwareAdvisorAutoProxyCreator.class)
GrailsApp.run(Application)
}
}
/**
* To enable @Secured method security
*/
@EnableGlobalMethodSecurity(securedEnabled = true)
class MethodSecurityConfiguration extends GlobalMethodSecurityConfiguration {
Logger log = LoggerFactory.getLogger(MethodSecurityConfiguration.class)
MethodSecurityConfiguration() {
log.debug("MethodSecurityConfiguration initialized")
}
}
class Application extends GrailsAutoConfiguration {
Closure doWithSpring() {{->
System.out.println("INFO: Extending APC_PRIORITY_LIST with GroovyAwareAspectJAwareAdvisorAutoProxyCreator")
// this is a work-around to get @Secured method security up and running
// looks like the GroovyAwareAspectJAwareAdvisorAutoProxyCreator is missing in AopConfigUtils
Field field = AopConfigUtils.getDeclaredField("APC_PRIORITY_LIST")
field.setAccessible(true)
List<Class<?>> list = (List<Class<?>>) field.get(null)
list.add(GroovyAwareAspectJAwareAdvisorAutoProxyCreator.class)
}}
static void main(String[] args) {
GrailsApp.run(Application)
}
}