title: OpenEntityManagerInViewFilter annotation config
body: <p>In order to overcome LazyInitializationException I've decided to use OpenEntityManagerInViewFilter but I couldn't do it annotation style. I've tried set it up two ways:</p>
  
  <p>First in onStartup method from WebApplicationInitializer:</p>
  
  <pre><code>OpenEntityManagerInViewFilter entityManagerInViewFilter = new OpenEntityManagerInViewFilter();
          entityManagerInViewFilter.setEntityManagerFactoryBeanName("entityManagerFactory");
          entityManagerInViewFilter.setPersistenceUnitName("defaultPersistenceUnit");
          FilterRegistration.Dynamic filter = sc.addFilter("openEntityManagerInViewFilter", entityManagerInViewFilter);
          filter.addMappingForUrlPatterns(null, false, "/*");
  </code></pre>
  
  <p>Second by creating new class that extends OpenEntityManagerInViewFilter and has annotation @WebFilter:</p>
  
  <pre><code>@WebFilter(urlPatterns = {"/*"})
  public class MainFilter extends OpenEntityManagerInViewFilter {
  
      public MainFilter() {
          setEntityManagerFactoryBeanName("entityManagerFactory");
          setPersistenceUnitName("defaultPersistanceUnit");
      }
  
  }
  </code></pre>
  
  <p>Each time I got "No bean named 'entityManagerFactory' is defined" or "No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined". My entity manager factory is defined in @Configuration class. </p>
  
  <p>How can I configure this filter without web.xml file?</p>