如何在 Grails 中查找动态方法和/或动态对象的文档?
我熟悉动态方法 通过 AOP 添加到 Grails 中的域对象。但由于它们是动态的,您如何找到它们的文档呢?
即使我知道哪些拦截器类可能将这些方法应用于域对象,在哪里查找这些方法的文档也不是很明显......
I'm familiar with the concept that dynamic methods are added via AOP to domain objects in Grails. But since they're dynamic, how is it that you find the documentation to them?
It wouldn't be obvious where to look for the documentation for these methods even if I knew what Interceptor classes might apply the methods to the domain objects...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有“Grails Runtime Docs”插件( http://grails.org/plugin/grails-runtime- docs ),它将从运行时生成 groovy 文档,还包括动态方法。它将添加“动态方法摘要”和“动态方法摘要”。生成的 html 文档中的“动态方法详细信息”提供了其源信息。这些类还分为控制器、命令、域、服务和标签库。
注意:我是一名 Grails 开发人员,我自己向 Grails 贡献了这个开源插件。希望您觉得它有用。
There is "Grails Runtime Docs" plugin ( http://grails.org/plugin/grails-runtime-docs ) which will generate the groovy documentation from runtime also including the dynamic methods. It will add "Dynamic Method Summary" & "Dynamic Method Detail" in the generated html docs which provide their source information. The classes are also categorized into Controllers, Commands, Domains, Services and Tag Libraries.
Note: I'm a grails developer and contributed this open-source plugin to Grails myself. Hope you find it useful.
查看 Grails 文档! http://grails.org/doc/latest/
右侧有一个快速参考,其中列出了添加到域类的动态方法等内容。这是一本好书,欣赏一下:)
Behold the Grails Docs! http://grails.org/doc/latest/
On the right side you have a quick reference that lists among other things dynamic methods added to Domain Classes. It's a good read, enjoy :)