Spring配置文件基本要点总结

Spring的重点配置:

<bean>标签:
id属性:在容器中Bean实例的唯一标识,不允许重复 class属性:要实例化的Bean的全限定名 scope属性:Bean的作用范围,常用是Singleton(默认)和prototype
<property>标签:属性注入 name属性:属性名称 value属性:注入的普通属性值 ref属性:注入的对象引用值

<list>标签 <map>标签 <properties>标签

<constructor-arg>标签

<import>标签:导入其他的Spring的分文件

 

总之 不懂就从头到尾看一遍!!

posted @ 2021-06-20 13:40  咸瑜  阅读(74)  评论(0编辑  收藏  举报