更简洁的注入方式(P命名空间、C命名空间和复合属性名)
p命名空间(p-namespace)
p命名空间:使用<bean/>
标签的属性来代替子标签<property/>
完成依赖注入。
使用p命名空间,首先要引入p命名空间的XSD(XML Scheema Definition)
xmlns:p="http://www.springframework.org/schema/p"
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
https://www.springframework.org/schema/beans/spring-beans.xsd">