1.在上述基础上,还得往容器中放入一个组件@ConfigurationpublicclassMyDataSourceConfig{@Bean@ConfigurationProperties("spring.datasource")publicDataSourcedataSource(){DruidDataSourcedruidDataSource=newDruidDataSource();returndruidDataSource;}//重点1:加入自定义的servlet@BeanpublicServletRegistrationBeanstatViewServlet...