Spring in Action 3 - Spring’s p namespace

来源:互联网 发布:c语言预处理命令 编辑:程序博客网 时间:2024/05/17 17:18

Wiring properties with Spring’s p namespace

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

bean id="kenny"class="com.springinaction.springidol.Instrumentalist"
p:song="JingleBells"
p:instrument-ref="saxophone"
/>