My application can have below URLs:
/siteadmin/homepage/
/siteusers/customer/createCustomer
Below is my spring-security.xml
:
See AntPathMatcher:
The mapping matches URLs using the following rules:
?
matches one character*
matches zero or more characters**
matches zero or more directories in a pathSome examples:
com/t?st.jsp
- matchescom/test.jsp
but alsocom/tast.jsp
orcom/txst.jsp
com/*.jsp
- matches all.jsp
files in thecom
directorycom/**/test.jsp
- matches alltest.jsp
files underneath thecom
pathorg/springframework/**/*.jsp
- matches all.jsp
files underneath theorg/springframework
pathorg/**/servlet/bla.jsp
- matchesorg/springframework/servlet/bla.jsp
but alsoorg/springframework/testing/servlet/bla.jsp
andorg/servlet/bla.jsp
Your pattern /siteadmin***
misses slashes. Use /siteadmin/**
.