title: URL path matcher in java (Spring)
body: <p>in our application we are creating request filters which should not be hit for some urls. We want be able to exclude urls like spring do witch url patterns, e.g.:</p>
  
  <pre><code>// register filter in bean
  FilterRegistrationBean filterBeanRegistration = new FilterRegistrationBean();
  filterBeanRegistration.setFilter(myFilter());
  filterBeanRegistration.addInitParameter("excluded", "*/foo/**, */bar/**");
  ...
  </code></pre>
  
  <p>and new filter doesn't hit urls like <code>domain:8080/aaa/foo/xxxx</code>, <code>domain:8080/bbb/bar/xxxx</code> .</p>
  
  <p>Can you tell me how to do that with spring classes or another simple way? Thank you in advice.</p>
  
  <p>EDIT:
  There is <code>FilterBeanRegistration#addUrlPatterns(String... urls)</code> method where I can specify urls, but there is no any format which tells which url should hit. For our purposes is better exclude some urls.</p>