Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- JavaScript
- plugin
- GIT
- Windows 10
- Mac
- tomcat
- VirtualBox
- profile
- netsh
- Quartz
- bash
- vscode
- grep
- lsof
- port
- Windows
- web.xml
- 줄바꿈 문자
- xargs
- 네트워크
- IntelliJ
- context
- Eclipse
- ssh
- maVen
- import
- resource
- 단축키
- find
- Source
Archives
- Today
- Total
develog
[Spring] beans.xml 설정1, 기본 본문
spring-config.xml
<beans>
<bean id="myService" class="com.my.service.MyService">
<property name="myDao" ref="myDao"/>
</bean>
<bean id="myDao" class="com.my.dao.MyDao"/>
</beans>
MyService.java
package com.my.service;
public class MyService {
private MyDao myDao;
public void setMyDao(MyDao myDao) {
this.myDao = myDao;
}
public MyDao getMyDao() {
return myDao;
}
}
MyDao.java
package com.my.dao;
public class MyDao {
}
'Dev > Spring' 카테고리의 다른 글
| [Spring] beans.xml 설정3, component-scan (0) | 2015.08.28 |
|---|---|
| [Spring] beans.xml 설정2, annotation-config (0) | 2015.08.28 |
| [Spring] beans.xml (0) | 2015.06.04 |
| [Spring] Spring3 AOP 설정, xml or java (0) | 2015.06.04 |
| [Spring] static method injection (0) | 2014.11.11 |
Comments