在 spring 中,最常用的两种扩展就是
BeanFactoryPostProcessor和BeanPostProcessor, 当然还有其他的扩展,比如ApplicationListener,SpringApplicationRunListener等等。
BeanFactoryPostProcessor
源码位置: org.springframework.beans.factory.config.BeanFactoryPostProcessor
spring boot启动流程必须懂。
启动类示例:
| |
源码位置: org.springframework.boot.SpringApplication#SpringApplication
spring mvc原理真的必须懂, 之前写的源码导读。
源码位置: org.springframework.web.servlet.DispatcherServlet#doDispatch