springmvc与spring中的Bean
一个 bean 配置在 springmvc 的配置文件如
springmvc-servlet.xml 跟配置在 spring 全局配置文 件
applicationContext 中有什么区别。
答:配置在 springmvc 配置文件中的 bean 属于子容器中内容。配置在全局配置文件中的
bean 属于父容器。子容器可以获取父容器中的内容,而父容器不可以获得子容器中的内容。
一个 bean 配置在 springmvc 的配置文件如
springmvc-servlet.xml 跟配置在 spring 全局配置文 件
applicationContext 中有什么区别。
答:配置在 springmvc 配置文件中的 bean 属于子容器中内容。配置在全局配置文件中的
bean 属于父容器。子容器可以获取父容器中的内容,而父容器不可以获得子容器中的内容。