博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Spring 【引用】类型【注入】
阅读量:4694 次
发布时间:2019-06-09

本文共 428 字,大约阅读时间需要 1 分钟。

 

在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>

转载于:https://www.cnblogs.com/luffya/p/3475051.html

你可能感兴趣的文章
Day18
查看>>
Web Service数据源
查看>>
php.ini详解(转)
查看>>
[转]基于Python的接口测试框架
查看>>
"ORA-00942: 表或视图不存在 "的原因和解决方法[转]
查看>>
PeekMessage、GetMessage的区别
查看>>
磁盘使用率达到100%
查看>>
linux跳过root密码登陆
查看>>
201571030130/201571030124《小学四则运算练习软件需求说明》结对项目报告
查看>>
mini2440 U-boot 编译
查看>>
在UTF-8中,一个汉字为什么需要三个字节?
查看>>
浅谈 WPF控件
查看>>
学习ThreadLocal
查看>>
在 Visual Studio 调试器中指定符号 (.pdb) 和源文件
查看>>
直接量
查看>>
leetcode 115. 不同的子序列(Distinct Subsequences)
查看>>
三元表达式
查看>>
Go初接触之libjpeg-turbo
查看>>
python--生成器协程运算
查看>>
INFT 3030 Concurrent Programming
查看>>