springboot1.5.8.RELEASE, druid1.1.5css
@Bean public ServletRegistrationBean druidServlet() { ServletRegistrationBean reg = new ServletRegistrationBean(); reg.setServlet(new StatViewServlet()); reg.addUrlMappings("/druid/*"); reg.addInitParameter("loginUsername", "druid"); reg.addInitParameter("loginPassword", "druid"); reg.addInitParameter("logSlowSql", true+""); return reg; } @Bean public FilterRegistrationBean filterRegistrationBean() { FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(); filterRegistrationBean.setFilter(new WebStatFilter()); filterRegistrationBean.addUrlPatterns("*"); filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid*//**//*"); filterRegistrationBean.addInitParameter("profileEnable", "true"); return filterRegistrationBean; }
http://127.0.0.1:8080/druid/ git