This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

If my understanding is correct, you're trying to lock down all requests to /user/** to require admin permissions except for the custom login url? If so, intercept urls are processed in order. So something like:

Comment

Thanks for the the reply arthomps but my question was kinda aimed a little differently.

Code:

The problem is that if I have a link
<a href="viewUsers.html">View Users</a>
How can I get this link mapped to the path
@RequestMapping(value="/user/viewUsers.html")
instead of
@RequestMapping(value="/viewUsers.html")
If i have it <a href="viewUsers.html"> with the path /user/viewUsers.html, it gives me a resource not found 404.

Is there also a way just to restrict folders in general?
Like under /views/pages/user/. I want to restrict the user folder.

For Pre-pocessing before it gets towards controller user HandlerInterceptor(may be its Implementation HandlerInterceptorAdaptor) here you can make it to /user/viewUsers.html and then at controller let it be mapped with /user/viewUsers.html