ASP.Net MVC contains useful class UrlHelper, and using that I can create URL to my method controller like this:
var myUrl = helper.Generate<MySuperController>(x => x.MyAwesomeMethod(
myCharmingParameter1, myPrettyParameter2));
where helper
is UrlHelper instance. When I rename MyAwesomeMethod
with ReSharper, it will be renamed everywhere and myUrl
will points to new location automatically.
I need similar functionality for use in Spring MVC: for example, when I change value in @GetMapping("/api/getFields")
annotation on method. I don't want to replace to new url everywhere in the project. I just want to generate new url automatically.
How it can be reached?