use of com.alibaba.druid.support.http.StatViewServlet in project tesla by linking12.
the class DruidDBConfig method druidServlet.
@Bean
public ServletRegistrationBean druidServlet() {
ServletRegistrationBean reg = new ServletRegistrationBean();
reg.setServlet(new StatViewServlet());
reg.addUrlMappings("/druid/*");
// 白名单
reg.addInitParameter("allow", "");
return reg;
}
use of com.alibaba.druid.support.http.StatViewServlet in project elephant by yanghuijava.
the class DruidConfiguration method druidServlet.
@Bean
public ServletRegistrationBean druidServlet() {
logger.info("init Druid Servlet Configuration ");
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*");
// IP白名单
servletRegistrationBean.addInitParameter("allow", "");
// IP黑名单(共同存在时,deny优先于allow)
// servletRegistrationBean.addInitParameter("deny", "");
// 控制台管理用户
servletRegistrationBean.addInitParameter("loginUsername", "admin");
servletRegistrationBean.addInitParameter("loginPassword", "admin");
// 是否能够重置数据 禁用HTML页面上的“Reset All”功能
servletRegistrationBean.addInitParameter("resetEnable", "false");
return servletRegistrationBean;
}
use of com.alibaba.druid.support.http.StatViewServlet in project CBEC-B2B by A-Cubic.
the class DataSourceConfig method servletRegistrationBean.
// 数据源监控
@Bean
public ServletRegistrationBean servletRegistrationBean() {
ServletRegistrationBean registration = new ServletRegistrationBean();
registration.setServlet(new StatViewServlet());
registration.setName("druid");
registration.setUrlMappings(Lists.newArrayList("/druid/*"));
// 自定义添加初始化参数
Map<String, String> intParams = new HashMap<>();
intParams.put("loginUsername", "admin");
intParams.put("loginPassword", "llwell@druid");
registration.setName("DruidWebStatFilter");
registration.setInitParameters(intParams);
return registration;
}
use of com.alibaba.druid.support.http.StatViewServlet in project Ganster-CMS by Gangster-trio.
the class DruidConfig method druidServlet.
@Bean
public ServletRegistrationBean druidServlet() {
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*");
// 登录查看信息的账号密码.
servletRegistrationBean.addInitParameter("loginUsername", "admin");
servletRegistrationBean.addInitParameter("loginPassword", "123456");
return servletRegistrationBean;
}
use of com.alibaba.druid.support.http.StatViewServlet in project flybiner-sso by youyouxi.
the class DruidConfig method druidServlet.
@Bean
public ServletRegistrationBean druidServlet() {
ServletRegistrationBean reg = new ServletRegistrationBean();
reg.setServlet(new StatViewServlet());
reg.addUrlMappings("/druid/*");
reg.addInitParameter("loginUsername", "chenjianbin");
reg.addInitParameter("loginPassword", "123456");
return reg;
}
Aggregations