title: How to get path inside @GetMapping from other service
body: <p>I have a rest controller with @GetMapping annotation for mapping HTTP requests onto specific handler methods:</p>
  
  <pre><code>@RestController
  class Handler(){
      @GetMapping(path = ["method"])
      fun handlerMethod(){
          //...
      }
  }
  </code></pre>
  
  <p>Also I have email service where I need to send some email with link to my endpoint (in that case <a href="http://host/method" rel="nofollow noreferrer">http://host/method</a>)</p>
  
  <pre><code>@Service
  class EmailService(val config: Config){
  
      fun sendEmail(){
          // send "config.baseUrl/${getMethodPath()}"
      }
  
      fun getMethodPath(){
          //todo
      }
  }
  </code></pre>
  
  <p>Here I get base url from configuration (<a href="http://host" rel="nofollow noreferrer">http://host</a>). Is there any way to get path attribute in EmailService from Handler's @GetMapping for build link to my service?</p>