为什么在ServletContextInitializer中定义的Bean没有日志?
Spring Boot 版本:Spring Boot 2.1.6.RELEASE 版本下解析的。
1.为什么在ServletContextInitializer中定义的Bean没有日志?而在ServletRegistrationBean中定义的Bean有日志提现?
1)首先查看 org.springframework.boot.web.servlet.ServletContextInitializer 的代码:
2)对 onStartUp进行调用链查找。
org.springframework.boot.web.embedded.tomcat.TomcatStarter.java
追踪到 org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.java
TODO:还没写完,我再捋捋.....