doWithDynamicMethods 没有被调用
当我创建生产战争(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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查 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?!