This is an enhancement ticket.
Context
apache/grails-core#9657
https://grails.slack.com/archives/plugins/p1471423052000063
People has issues with the naming convention for the UrlMappings file in plugins.
Proposal
Prepend the plugin name to the UrlMappings filename to prevent unpredictable results.
Solution
I was thinking on adding the following to the profile.yml but is already present
excludes:
- grails-app/controllers/UrlMappings.groovy
I would like to know how to exclude the default UrlMappings.groovy that comes from the web profile
After that, create the UrlMappings artifact as follows:
@grails.codegen.projectClassName@UrlMappings.groovy
package @grails.codegen.defaultPackage@
class @grails.codegen.projectClassName@UrlMappings {
static mappings = {
"/$controller/$action?/$id?(.$format)?"{
constraints {
// apply constraints here
}
}
"/"(view:"/index")
"500"(view:'/error')
"404"(view:'/notFound')
}
}
Is this something that could generate value this profile?
What do you think? Is this something that you would like to have?
Thanks
Roberto
This is an enhancement ticket.
Context
apache/grails-core#9657
https://grails.slack.com/archives/plugins/p1471423052000063
People has issues with the naming convention for the UrlMappings file in plugins.
Proposal
Prepend the plugin name to the UrlMappings filename to prevent unpredictable results.
Solution
I was thinking on adding the following to the profile.yml but is already present
I would like to know how to exclude the default
UrlMappings.groovythat comes from thewebprofileAfter that, create the UrlMappings artifact as follows:
@grails.codegen.projectClassName@UrlMappings.groovyIs this something that could generate value this profile?
What do you think? Is this something that you would like to have?
Thanks
Roberto