package com.lance.mybatis;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SimpleApplication {

	public static void main(String[] args) {
		SpringApplication.run(SimpleApplication.class, args);
	}
}

@@ -21,16 +21,90 @@
 batis;%0A%0A
+import java.util.Arrays;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0A
 import o
@@ -219,162 +219,852 @@
 on;%0A
-%0A@SpringBootApplication%0Apublic class SimpleApplication %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09SpringApplication.run(SimpleApplication.class, args)
+import org.springframework.boot.context.embedded.ServletRegistrationBean;%0Aimport org.springframework.context.annotation.Bean;%0A%0Aimport com.alibaba.druid.support.http.StatViewServlet;%0A%0A@SpringBootApplication%0Apublic class SimpleApplication %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09SpringApplication.run(SimpleApplication.class, args);%0A%09%7D%0A%09%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 druidServlet() %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

add ServletRegistrationBean