I have several different controllers, configured with endpoints like below. Where {id} is a numeric @PathVariable.
@RequestMapping(value = "/noun1/noun2/{id}/verb1")
@RequestMapping(value = "/noun1/noun2/{id}/verb2")
@RequestMapping(value = "/noun1/noun2/{id}/verb3/verb4")
@RequestMapping(value = "/noun1/noun2/noun3/verb5")
Using HttpSecurity, I want to implement security around all endpoints that have {id} in them. So I created an ant pattern like this:
"/noun1/noun2/{id}/**"
The ant pattern is correctly matching on the endpoints with {id} in them. However, the ant pattern is also matching on the last endpoint, setting id = noun3. Is there a way with ant patterns to only match the endpoints containing {id}?