2018年12月27日

Spring boot 梳理 - Spring boot自动注册DispatcherServlet

摘要: 首先,DispatcherServlet被作为一个普通Bean被定义和注册到容器; 然后,又定义了另外一个ServletRegistrationBean bean用来添加该DispatcherServlet bean到ServletContext; 1.@WebServlet注解: 这个是javae 阅读全文

posted @ 2018-12-27 22:53 手握太阳 阅读(4761) 评论(0) 推荐(0) 编辑

Spring boot - 梳理 - 根本上说,Spring Boot项目只不过是一个普通的Spring项目,只是使用了Spring Boot的起步依赖和自动配置

摘要: 根本上说,Spring Boot项目只不过是一个普通的Spring项目,只是使用了Spring Boot的起步依赖和自动配置 阅读全文

posted @ 2018-12-27 22:25 手握太阳 阅读(258) 评论(0) 推荐(0) 编辑

Spring boot 梳理 - SpringBoot中注入ApplicationContext对象的三种方式

摘要: 直接注入(Autowired) @Configuration public class OAConfig { @Autowired private ApplicationContext applicationContext; @Bean public PersonUtils personUtil(){ boolean bool=app... 阅读全文

posted @ 2018-12-27 22:06 手握太阳 阅读(8658) 评论(0) 推荐(0) 编辑

导航