Resolution: Cannot Reproduce
Affects Version/s: 3.0 GA
Fix Version/s: None
Last commented by a User:true
the issue only starts from upgrade from 2.5.6 to 3.0.0.
let's say we have two urlMapping in a SimpleUrlHandlerMapping:
when using the url:
in spring 2.5.6 the AbstractUrlHandletMapping returns the second match as best match:
This is ok, because the count of wildcasts for both entries are equal and the second entry matchs more charachters than the first one.
This behaviour is changed in spring 3.0.0. A new introduced AntPatternComparator in 3.0.0 is used for this propose:
In this case the comparator sorts the shorter url mapping (/**/login.*) higher than the longer one (/**/endUser/action/login.*). This results in matching controller1 when using the url:
Which is not correct in my view.
I presume that a best match is the match with the most matched characters in url path.