doWithDynamicMethods 没有被调用

发布于 2024-09-27 20:57:26 字数 620 浏览 0 评论 0原文

当我创建生产战争(grails war --nojars)时,我的 doWithDynamicMethods 不会在生产环境中被调用。代码在开发环境中工作(即 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"

我们正在使用 Grails 1.3 Windows XP 上的 .5,从 STS 2.3.3.CI-R5462-B20 调用构建,

提前致谢。

When I create a production war (grails war --nojars) my doWithDynamicMethods is not being called in a production environment. The code works in the dev env (ie grails run-app)

Here is some of my code:

PDFFormsGrailsPlugin.groovy (in PDFForms (plugin) directory) :-

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

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

BuildConfig.groovy (in Application using Plugin) :-

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

We are using Grails 1.3.5 on Windows XP, The Build is called from STS 2.3.3.CI-R5462-B20

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

极度宠爱 2024-10-04 20:57:26

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

阅读此 Nabble 线程

还有这个jira

PS 为什么不至少升级到grails 1.3.7?!

Check if the plugin is referenced in your grails.xml.

Read this Nabble thread

And this jira

P.S. Why not you upgrade to grails 1.3.7 at least?!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文