依赖注入-xml-p命名空间
引入 xmlns:p="http://www.springframework.org/schema/p"
,然后可以在 <bean>
标签中,通过 p:属性名
或者 p:属性名-ref
进行注入。
<bean id="studentp" class="com.atguigu.spring6.iocxml.dimap.Student"
p:sid="100" p:sname="mary" p:lessonList-ref="lessonList" p:teacherMap-ref="teacherMap">
</bean>