标签:new array ash source 监控 bst uid login arrays
@Configuration public class DataSourceConfig { @Bean public ServletRegistrationBean statViewServlet(){ ServletRegistrationBean bean = new ServletRegistrationBean(new StatViewServlet(),"/druid/*"); Map<String, String> initMap = new HashMap<>(); initMap.put(StatViewServlet.PARAM_NAME_JMX_USERNAME,"admin"); initMap.put(StatViewServlet.PARAM_NAME_JMX_PASSWORD,"123456"); initMap.put("loginUsername", "admin"); initMap.put("loginPassword", "123456"); bean.setInitParameters(initMap); return bean; } @Bean public FilterRegistrationBean webStatFilter(){ FilterRegistrationBean bean = new FilterRegistrationBean(); bean.setFilter(new WebStatFilter()); Map<String, String> initMap = new HashMap<>(); bean.setInitParameters(initMap); bean.setUrlPatterns(Arrays.asList("/*")); return bean; } }
标签:new array ash source 监控 bst uid login arrays
原文地址:https://www.cnblogs.com/mengjianzhou/p/9091569.html