Grails插件如何添加自己的URLMappings?

时间:2011-12-23 16:57:37

标签: grails plugins configuration url-mapping

我正在创建一个Grails插件,我希望它能添加自己的UrlMappings。使用插件的应用程序会忽略插件源中的UrlMappings.groovy文件,那么应该在哪里定义它们?

1 个答案:

答案 0 :(得分:13)

请参阅http://grails.org/doc/latest/guide/single.html#pluginsNotes on excluded Artefacts

In addition, although UrlMappings.groovy is excluded 
you are allowed to include a UrlMappings definition with 
a different name, such as MyPluginUrlMappings.groovy.