image.png
    在标签配置过程中 为了简便配置文件的写法 Spring给我们提供了以下的方式
    命名空间
    property p:
    constructor-arg c:
    有了这种命名空间规范后 ,可以将原来嵌套在bean标签中的两个属性 放在bean标签中

    c的用法与p类似:

    1. <bean id="computer" class="domain.Computer">
    2. <property name="brand" value="huawei"></property>
    3. </bean>

    等价于

    <bean p:brand="huawei"></bean>
    

    如果是引用数据类型:
    image.png
    image.png