/** Initializes H2 console. */ private void initH2Console(ServletContext servletContext) { log.debug("Initialize H2 console"); ServletRegistration.Dynamic h2ConsoleServlet = servletContext.addServlet("H2Console", new org.h2.server.web.WebServlet()); h2ConsoleServlet.addMapping("/h2-console/*"); h2ConsoleServlet.setInitParameter("-properties", "src/main/resources/"); h2ConsoleServlet.setLoadOnStartup(1); }
/** Initializes Metrics. */ private void initMetrics(ServletContext servletContext, EnumSet<DispatcherType> disps) { log.debug("Initializing Metrics registries"); servletContext.setAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE, metricRegistry); servletContext.setAttribute(MetricsServlet.METRICS_REGISTRY, metricRegistry); log.debug("Registering Metrics Filter"); FilterRegistration.Dynamic metricsFilter = servletContext.addFilter("webappMetricsFilter", new InstrumentedFilter()); metricsFilter.addMappingForUrlPatterns(disps, true, "/*"); metricsFilter.setAsyncSupported(true); log.debug("Registering Metrics Servlet"); ServletRegistration.Dynamic metricsAdminServlet = servletContext.addServlet("metricsServlet", new MetricsServlet()); metricsAdminServlet.addMapping("/management/jhipster/metrics/*"); metricsAdminServlet.setAsyncSupported(true); metricsAdminServlet.setLoadOnStartup(2); }
@Override public ServletRegistration.Dynamic addServlet(String s, Class<? extends Servlet> aClass) { return proxy.addServlet(s, aClass); }
@Override public ServletRegistration.Dynamic addServlet(String s, Servlet servlet) { return proxy.addServlet(s, servlet); }
public javax.servlet.ServletRegistration.Dynamic addServlet( String arg0, Class<? extends Servlet> arg1) { return servletContext.addServlet(arg0, arg1); }
public javax.servlet.ServletRegistration.Dynamic addServlet(String arg0, Servlet arg1) { return servletContext.addServlet(arg0, arg1); }