I'm developing REST API with Spring MVC and securing it with Spring Security. I have two URL's, one is /company/{id} and the second one is /countries. ws is my servlet mapping.
<intercept-url pattern="/ws/*" access="ROLE_ADMIN"/>
is configured, however when I try to access to /company/1 it passes me
11:17:19,751 DEBUG http-bio-8080-exec-10 AntPathRequestMatcher:matches:103 - Checking match of request : '/ws/company/1'; against '/ws/*'
11:17:19,751 DEBUG http-bio-8080-exec-10 FilterSecurityInterceptor:beforeInvocation:184 - Public object - authentication not attempted
and with /countries everything works fine. I've read this question and do use global security in my mvc related context. Can't figure out what's the issue.