title: SpringBoot Actuator getting overshadowed by BaseService Servlet on same Port
body: <p>We are Attempting to Migrate Our Existing Spring WebServices App to SpringBoot and ran into an issue for which we seek your advice.</p>
  <p>We have a Base Service Servlet that disables the GET on the port that the App is deployed on for Security reasons this servlet returns 501 Unimplemented Response as follows:</p>
  <pre class="lang-java prettyprint-override"><code> @Override
      protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          log.warn(&quot;GET request received!&quot;);
          response.setStatus(HttpServletResponse.SC_NOT_IMPLEMENTED);
      }
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>public abstract class BaseServiceServlet extends HttpServlet {
   ...
   } 
    
   public class ServiceServlet extends BaseServiceServlet {
   ...
   } 
    
    
    public class ServletInitializer extends SpringBootServletInitializer implements ServletContextInitializer { 
    @Override
      public void onStartup(ServletContext container) throws ServletException {
           
        ServletRegistration.Dynamic application = container
                  .addServlet(&quot;ServiceServlet&quot;, new ServiceServlet()); 
        application.setLoadOnStartup(2);
        application.addMapping(&quot;/*&quot;);
          
      }
   }
  </code></pre>
  <p>Previously we had an old-fashioned HealthCheck JSP that we implemented. With the move to SpringBoot we are now using the SpringBoot Actuator.</p>
  <p>But we find that if we set the Actuator health monitor port to the same one as the App when we try to monitor the health we get the 501 Unimplemented response.</p>
  <p>Config is as follows:</p>
  <pre><code># Spring-Boot Embedded Tomcat Config
  server.port=8080
  server.connection-timeout=10s
  server.ssl.enabled=false
  ## Springboot based health monitor
  management.endpoints.enabled-by-default=true
  management.endpoint.health.enabled=true
  management.endpoint.loggers.enabled=true
  management.endpoints.web.cors.allowed-methods=GET
  management.endpoint.beans.cache.time-to-live=20s
  management.endpoints.web.base-path=/manage
  management.server.port=8080
  management.security.enabled=false 
  </code></pre>
  <p>One way we could get around this problem is if we changed the actuator health check port to something else that Works.</p>
  <p>Question:
  How can we set the Actuator port to be the same as the App and make the actuator health check url which is something like http://localhost:8080/manage/health not return 501 Unimplemented from the Base Service Servlet ?</p>