doWithDynamicMethods没有被调用

时间:2010-10-19 00:56:59

标签: grails grails-plugin

当我创建一个生产战争(grails war --nojars)时,我的doWithDynamicMethods没有在生产环境中被调用。该代码适用于dev env(即grails run-app)

以下是我的一些代码:

PDFFormsGrailsPlugin.groovy(在PDFForms(插件)目录中): -

 def doWithDynamicMethods = { ctx ->
  println "Adding renderPDFForm to controller";

  for (controllerClass in application.controllerClasses) {
   updateControllers controllerClass.metaClass
  } 
    }

BuildConfig.groovy(在使用插件的应用程序中): -

grails.plugin.location.'pdff-orms' = "../PDFForms"

我们在Windows XP上使用Grails 1.3.5,从STS 2.3.3.CI-R5462-B20调用Build

提前致谢。

1 个答案:

答案 0 :(得分:0)

检查grails.xml中是否引用了该插件。

阅读此Nabble thread

这是jira

P.S。为什么不至少升级到grails 1.3.7?