@@ -0,0 +1,1422 @@
+package com.lance.shiro.config;%0A%0Aimport java.util.Arrays;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport org.springframework.boot.context.embedded.FilterRegistrationBean;%0Aimport org.springframework.boot.context.embedded.ServletRegistrationBean;%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.annotation.Configuration;%0A%0Aimport com.alibaba.druid.support.http.StatViewServlet;%0Aimport com.alibaba.druid.support.http.WebStatFilter;%0A%0A@Configuration%0Apublic class DruidConfig %7B%0A%09/**%0A%09 * ServletRegistrationBean,%0A%09 * @see com.alibaba.druid.support.http.ResourceServlet%0A%09 * @return%0A%09 */%0A%09@Bean%0A%09public ServletRegistrationBean statViewServlet() %7B%0A%09%09ServletRegistrationBean druid = new ServletRegistrationBean();%0A%09%09druid.setServlet(new StatViewServlet());%0A%09%09druid.setUrlMappings(Arrays.asList(%22/druid/*%22));%0A%09%09%0A%09%09Map%3CString,String%3E params = new HashMap%3C%3E();%0A%09%09params.put(%22loginUsername%22, %22admin%22);%0A%09%09params.put(%22loginPassword%22, %22admin%22);%0A%09%09druid.setInitParameters(params);%0A%09%09return druid;%0A%09%7D%0A%09%0A%09/**%0A%09 * @see com.alibaba.druid.support.http.WebStatFilter%0A%09 * @return%0A%09 */%0A%09@Bean%0A%09public FilterRegistrationBean webStatFilter()%7B%0A%09%09FilterRegistrationBean fitler = new FilterRegistrationBean();%0A%09%09fitler.setFilter(new WebStatFilter());%0A%09%09fitler.setUrlPatterns(Arrays.asList(%22/*%22));%0A%09%09fitler.addInitParameter(%22exclusions%22, %22*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*%22);%0A%09%09return fitler;%0A%09%7D%0A%7D%0A

add datesource config