默认情况下,Spring 容器中未打开注解装配。因此,要使用基于注解装配,我们 必须通过配置 <context:annotation-config/> 元素在 Spring 配置文件 中启用它。 相关文章: