title: 2 Spring WebApplicationInitializers detected
body: <p>I have a spring boot application with actuator.  The /health page works when I deploy the application as Embeded web deployment.  But if I create a war file and deploy it in external Tomcat I get prompted for token to access the health page.  Here is my SecurityConfig.java</p>
  
  <pre><code>protected void configure(HttpSecurity http) throws Exception {
      http.csrf().disable();
      http.authorizeRequests()
          .antMatchers("/services/courses/**").authenticated();
          .antMatchers("/services/health").permitAll()
          .antMatchers("/services/auth/token").permitAll();
      Filter tokenAuthenticationFilter = (Filter) this.tokenAuthenticationFilter;
      http.addFilterBefore(tokenAuthenticationFilter,  UsernamePasswordAuthenticationFilter.class);
  }
  </code></pre>
  
  <p>While looking at tomcat log files, I see the following logs in localhost.2016-08-08.log </p>
  
  <pre><code>08-Aug-2016 11:58:40.186 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log 2 Spring WebApplicationInitializers detected on classpath
  08-Aug-2016 11:58:44.928 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring embedded WebApplicationContext
  08-Aug-2016 11:59:02.412 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
  </code></pre>
  
  <p>I have already added logging.level.org.springframework.web=DEBUG, and -verbose:class to see class loading information.  But so far have not made much progress.  </p>
  
  <p>Any idea what else I should try?</p>