Reputation: 1517
Grails always provides URL for every method in a Controller
. For example, if there's a method branch()
in controller repository
, there would be automatically a URL for localhost:8080/project/repository/branch
.
What I want is to disable this. So unless I declare that URL to URLMappings.groovy
, accessing this webpage will render a 404 Error, even this Controller/method
exists.
I'm using Grails
2.4.4 by the way.
Upvotes: 0
Views: 76
Reputation: 578
You should remove this code, from your UrlMappings:
"/$controller/$action?/$id?(.$format)?" {
constraints {
// apply constraints here
}
}
Now you will get 404 if you haven't declared mapping for each action.
Upvotes: 2