在applicationConext.xml 中 的 beans 元素中........
<!-- 配置 spring 的 bean -->
<bean id="greetingService" class="service.GreetingService"> <property name="greeting"> <value>hello world</value> </property><property name="bs" ref="byeService"/> <!-- 引用 下面的 实体 bean -->
</bean>
<!-- 欢送服务 -->
<bean id="byeService" class="service.ByeService">
<property name="bye" value="later"/>
</bean>