Doesn't spring handler mapping use spring HandlerMappingIntrospector to match received urls? So why doesn't mvc macther, which itself uses this class, work like handler mapping? For example, in @RequestMapping, you can not put / before the address and the program will work correctly. But in mvc matcher, if we do not put / before the address, that page will not be secured. Why?
@RequestMapping("contact") // it works
but:
http.csrf().disable()
.authorizeRequests()
.mvcMatchers("contact").authenticated() //if we do not put / at the first of the home it does not recohnize the address