title: How to get custom annotations within spring-boot filter
body: <p>I have a spring boot application with a custom filter:</p>
  <pre><code>import javax.servlet.Filter
  
  public class MyFilter implements Filter{
  
      @Override
      public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) {
          System.out.println(&quot;MyFilter&quot;);
      }
  }
  </code></pre>
  <p>Some controllers in the application have custom annotations over their methods.
  All custom annotations implement the myAnnotation interface.</p>
  <pre><code>    @GetMapping(&quot;/&quot;)
      @MyCustomAnnotation
      @AnotherCustomAnnotation
      public ResponseEntity&lt;String&gt; get(){
          addSomeMetric();
          return new ResponseEntity&lt;&gt;(&quot;Hello world&quot;, HttpStatus.OK);
      }
  </code></pre>
  <p>How can get i get a list of all annotations defined on the URI endpoint from within the doFilter code?</p>