Grails编译错误

时间:2011-12-08 08:48:09

标签: grails spring-security

我的Grails应用中出现以下错误。 Grails 1.3.7,Spring Security插件2.6如何解决这个问题?我仍然可以运行应用程序,但这真的让我烦恼。

 Configuring Spring Security UI ...
2011-12-08 09:35:07,701 [main] ERROR plugins.DefaultGrailsPluginManager  - Error configuring dynamic methods for plugin [springSecurityCore:1.2.6]: You must provide a configuration attribute
java.lang.IllegalArgumentException: You must provide a configuration attribute
    at SpringSecurityCoreGrailsPlugin$_closure3.doCall(SpringSecurityCoreGrailsPlugin.groovy:538)
    at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:212)
    at grails.web.container.EmbeddableServer$start.call(Unknown Source)
    at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158)
    at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy)
    at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
    at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
    at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149)
    at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy)
    at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116)
    at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
    at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59)
    at _GrailsRun_groovy$_run_closure8_closure14.doCall(_GrailsRun_groovy:263)
    at _GrailsRun_groovy$_run_closure8_closure14.doCall(_GrailsRun_groovy)
    at _GrailsPackage_groovy$_run_closure8.doCall(_GrailsPackage_groovy:299)
    at _GrailsPackage_groovy$_run_closure8.call(_GrailsPackage_groovy)
    at _GrailsRun_groovy$_run_closure8.doCall(_GrailsRun_groovy:245)
    at RunApp$_run_closure1.doCall(RunApp:35)
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
    at gant.Gant.withBuildListeners(Gant.groovy:427)
    at gant.Gant.this$2$withBuildListeners(Gant.groovy)
    at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
    at gant.Gant.dispatch(Gant.groovy:415)
    at gant.Gant.this$2$dispatch(Gant.groovy)
    at gant.Gant.invokeMethod(Gant.groovy)
    at gant.Gant.executeTargets(Gant.groovy:590)
    at gant.Gant.executeTargets(Gant.groovy:589)
Server running. Browse to http://localhost:8080/Test2

1 个答案:

答案 0 :(得分:0)

我在1.2.4,但是SpringSecurityCoreGrailsPlugin.groovy:538中的插件代码引用了securityConfig中的filterChain(现在应该在你的Config.groovy文件中 - 与Acegi插件不同)。正如建议在插件源代码中查看。您可以在~/.grails/1.3.7/projects/{yourproject}/plugins

中找到它

这个插件是一个很棒的,如果有点复杂的野兽 - 通过教程了解基础知识:Spring Security Plugin Tutorial然后仔细阅读文档,它将为您节省大量时间。