use of com.alibaba.druid.support.http.StatViewServlet in project moon by gentoo111.
the class DruidConfig method druidServlet.
@Bean
public ServletRegistrationBean druidServlet() {
log.info("init Druid Servlet Configuration ");
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*");
// IP白名单
servletRegistrationBean.addInitParameter("allow", "127.0.0.1");
// servletRegistrationBean.addInitParameter("resetEnable", "false");
return servletRegistrationBean;
}
use of com.alibaba.druid.support.http.StatViewServlet in project vip by guangdada.
the class WebConfig method druidServletRegistration.
/**
* druidServlet注册
*/
@Bean
public ServletRegistrationBean druidServletRegistration() {
ServletRegistrationBean registration = new ServletRegistrationBean(new StatViewServlet());
registration.addUrlMappings("/druid/*");
return registration;
}
use of com.alibaba.druid.support.http.StatViewServlet in project neweagle-api by apgzs.
the class DruidConfiguration method druidServlet.
@Bean
public ServletRegistrationBean druidServlet() {
logger.info("init Druid Servlet Configuration ");
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean();
servletRegistrationBean.setServlet(new StatViewServlet());
servletRegistrationBean.addUrlMappings("/druid/*");
Map<String, String> initParameters = new HashMap<String, String>();
// 用户名
initParameters.put("loginUsername", "admin");
// 密码
initParameters.put("loginPassword", "admin");
// 禁用HTML页面上的“Reset All”功能
initParameters.put("resetEnable", "false");
// IP白名单 (没有配置或者为空,则允许所有访问)
initParameters.put("allow", "");
servletRegistrationBean.setInitParameters(initParameters);
return servletRegistrationBean;
}
use of com.alibaba.druid.support.http.StatViewServlet in project Spring-Family by Sierou-Java.
the class MasterDataSourceConfig method druidServlet.
@Bean
public ServletRegistrationBean druidServlet() {
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean();
servletRegistrationBean.setServlet(new StatViewServlet());
servletRegistrationBean.addUrlMappings("/druid/*");
return servletRegistrationBean;
}
use of com.alibaba.druid.support.http.StatViewServlet in project cloud-sea-towerman by huadahuang1983.
the class DataSourceConfig method druidServlet.
@Bean
public ServletRegistrationBean druidServlet() {
ServletRegistrationBean reg = new ServletRegistrationBean();
reg.setServlet(new StatViewServlet());
reg.addUrlMappings("/druid/*");
reg.addInitParameter("loginUsername", "druid");
reg.addInitParameter("loginPassword", "druid");
return reg;
}
Aggregations