SpringMVC和Spring父子容器关系

spring相当于一个父容器,springmvc相当于一个子容器,当在springAppliication.xml文件中配置扫描包<component-scann>时,不能解析子容器springmvc中的@Controller注解,但是在子容器中配置扫描包<component-scann>时,可以解析到spring管理的注解.

即:子容器可以访问父容器的对象.

Code change world
原文地址:https://www.cnblogs.com/icanner/p/9651118.html