`
@Autowired
WebApplicationContext wac;
wac.getParent(); // => null
`
原来spring有个父子容器的概念,父容器(ContextLoaderListener)用于bean创建等,子容器(DispatcherServlet)用于Controller、Intercepter等处理,但springboot中是否没有这个概念了?
作者:admin 2021-04-21 我要评论
` @Autowired WebApplicationContext wac; wac.getParent(); // = null ` 原来spring有个父子容器的概念,父容器(ContextLoaderListener)用于bean创建等,子容...
`
@Autowired
WebApplicationContext wac;
wac.getParent(); // => null
`
原来spring有个父子容器的概念,父容器(ContextLoaderListener)用于bean创建等,子容器(DispatcherServlet)用于Controller、Intercepter等处理,但springboot中是否没有这个概念了?
版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除