/** * Druid监控页面配置 * * @return */ @Bean public RegistrationBean getDruidStatViewServlet() { StatViewServlet servlet = new StatViewServlet(); ServletRegistrationBean bean = new ServletRegistrationBean(); bean.setServlet(servlet); bean.addUrlMappings("/druid/*"); bean.setLoadOnStartup(1); bean.addInitParameter("resetEnable", "false"); return bean; }
private void addInitParameters(RegistrationBean registration) { for (Entry<String, String> entry : this.jersey.getInit().entrySet()) { registration.addInitParameter(entry.getKey(), entry.getValue()); } }