为什么在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:还没写完,我再捋捋.....

扫描二维码关注公众号,回复: 10134305 查看本文章
发布了29 篇原创文章 · 获赞 0 · 访问量 4311

猜你喜欢

转载自blog.csdn.net/u011536031/article/details/104909759