title: How to get spring boot controller endpoint full url?
body: <p>How to get a specific spring boot controller endpoint full url without concat/hardcode strings? My case is need send a request to external url and get async notification back from it, so I need pass my notification endpoint full url to it. Here is sample code:</p>
  
  <pre><code>    @RestController
      @RequestMapping("/api/v1")
      public class MyController {
  
         @PostMapping("/sendRequest")
         public void sendRequest() {
            ...
            // 1. get /notifyStatus endpoint full url to be send to external service
            String myNotificationFullUrl = xxx ?
            // 2. call external service
         }
  
         @GetMapping("/notifyStatus")
         public void notifyStatus() {
            ...
         }
      }
  </code></pre>