Sping--Id, Name
2016-05-03 09:22
211 查看
bean, id/name 都可以
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" 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-2.5.xsd"> <bean name="u" class="com.bjsxt.dao.impl.UserDAOImpl"> </bean> <bean id="userService" class="com.bjsxt.service.UserService"> <!-- <property name="userDAO" ref="u" /> --> <constructor-arg> <ref bean="u"/> </constructor-arg> </bean> </beans>
相关文章推荐
- iOS-MVVM设计模式
- a different object with the same identifier value was already associated with the session:
- Activity和fragment生命周期总结
- C语言(数组啥时候变指针)
- iOS中的NSTimer定时器的初步使用解析
- SQL Server 2005 中使用 Try Catch 处理异常
- OpenCV学习笔记_图像扭曲及旋转操作
- iOS开发——NSDate(待续...)
- ubuntu 16.04 mysql 相关
- Hibernate的数据库操作
- tomcat启动超时 eclipse
- old bill
- LeetCode "Top K Frequent Elements"
- 打造强大的BaseModel(1):让Model自我描述
- iOS 并发概念浅析
- fieldset属性
- MyBatis 入门(一)--建立数据库连接及基本操作
- 查看 MySQL 数据库中每个表占用的空间大小
- iOS开发——keychain的使用
- iOS 手动打造JSON Model转换库