07Spring - Spring依赖注入(基于注解Annotation)

Spring依赖注入(基于注解Annotation) 在Spring中,尽管使用XML配置文件可以实现Bean的装配工作,但如果应用中有很多Bean时,会导致 XML 配置文件过于臃肿,给后续的维护和升级工作带来一定的困难。为此,Spring提供了对Annotation(注解) 技术的全面支持。 常用的注解 1)作用在类上(@Component组件) Spring中提供@Component的三个衍
相关文章
相关标签/搜索