我正在创建一个Grails插件,我希望它能添加自己的UrlMappings。使用插件的应用程序会忽略插件源中的UrlMappings.groovy
文件,那么应该在哪里定义它们?
答案 0 :(得分:13)
请参阅http://grails.org/doc/latest/guide/single.html#plugins:Notes 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.