Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 333
Ken Liu Avatar asked Dec 23 '11 16:12

Ken Liu


People also ask

What is a Grails plugin?

Grails plugin which allows you to view files stored on the file system.


1 Answers

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.
like image 162
Chris Avatar answered Nov 04 '22 14:11

Chris