Ken Liu
Ken Liu

Reputation: 22914

How does a Grails plugin add its own URLMappings?

I am creating a Grails plugin and I would like for it to add its own UrlMappings. The UrlMappings.groovy file in the plugin source is ignored by the application using the plugin, so where should these be defined?

Upvotes: 9

Views: 2536

Answers (1)

Chris
Chris

Reputation: 8109

See 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.

Upvotes: 15

Related Questions