title: How to access method annotations on spring controller from OncePerRequestFilter
body: <p>In a OncePerRequestFilter (method doFilterInternal), i'd like to access info about controller method (and ideally the controller itself too) that will eventually be run. Specifically, I'm looking for annotations that are on that method. Is there a way to access this from the doFilterInternal method? </p>
  
  <p>The problem is that without having access to info set on the methods themselves, we have to look at the url in the filter to determine if the method falls into this specific category. it gets ugly quickly to be like </p>
  
  <pre><code>if (url == "foo" || url == "bar" ... etc)
  </code></pre>
  
  <p>and ideally we could just say</p>
  
  <pre><code>if(method.hasAnnotation(Blah.class)) //or however it would look
  
  @Blah
  public void controllerMethod(...){}
  </code></pre>
  
  <p>and it'd be much neater to specify this at the method level. is there a way to do this, or some other way that i'm missing?</p>