【问题标题】:Grails compile errorGrails 编译错误
【发布时间】:2012-01-15 17:36:23
【问题描述】:

我的 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

【问题讨论】:

标签: grails spring-security


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 2015-02-03
    • 1970-01-01
    • 2013-12-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-17
    • 2011-01-10
    相关资源
    最近更新 更多