Is it possible to map a spring mvc controller by trailing keyword of a url. e.g, lets suppose I have following urls:
example.com/{cityName}example.com/{cityName}/{categoryName}example.com/{cityName}/pingexample.com/{cityName}/{categoryName}/ping
I want to have 3 controller methods. 1st url should be handled by controller "X", 2nd url should be handled by method "Y" and 3rd, 4th url should be handled by single method "Z". This means that any url ending by /ping should be handled by method "Z" only. No matter what is leading content of that url.
Is this feasible in Spring MVC?