So I have a Grails (3.2.4) app, but the routes are all set to be singular names by default. For example:
/product/2
/order/4952
I have managed to change the database table naming to use plural using the following in the Product domain class:
static mapping = {
table "products"
}
Reading the docs, I also found the following (added to UrlMappings.groovy) to create an alias using plural routes:
"/products"(resources:"product")
But the singularly-named routes end up still available. So either /product or /products can be used. Is there a way to change the default Grails routes to always use plural instead of singular naming convention? That is, a way so I don't have to explicitly write code to define them to be plural.