@Configuration
public class DruidConfiguration {
@Bean
public ServletRegistrationBean servletRegistrationBean() {
ServletRegistrationBean druidServlet = new ServletRegistrationBean(new StatViewServlet(), "/druid/*");
Map<String, String> map = new HashMap<String, String>();
map.put("loginUsername", "admin");
map.put("loginPassword", "druidPassword");
druidServlet.setInitParameters(map);
return druidServlet;
}标签:map,用户名,ServletRegistrationBean,druid,druidServlet,put,new,页面 From: https://www.cnblogs.com/liang2023/p/17144041.html
}