8

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

4

1 回答 1

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.
于 2011-12-23T17:09:37.783 回答