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 | 29 | 30 |
Tags
- grep
- netsh
- find
- resource
- maVen
- profile
- Source
- import
- GIT
- 단축키
- tomcat
- vscode
- lsof
- Windows
- Mac
- JavaScript
- plugin
- port
- context
- VirtualBox
- Eclipse
- ssh
- web.xml
- Windows 10
- bash
- 줄바꿈 문자
- 네트워크
- Quartz
- xargs
- IntelliJ
Archives
- Today
- Total
develog
[Spring] dbcp 설정 본문
jar
tomcat-dbcp.jar |
beans.xml
<bean id="dataSource" class="org.apache.tomcat.dbcp.dbcp.BasicDataSource"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> <property name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:orcl" /> <property name="username" value="scott" /> <property name="password" value="tiger" /> </bean> |
soruce
ApplicationContext context = new ClassPathXmlApplicationContext("classpath:beans.xml"); DataSource ds = (DataSource) context.getBean("dataSource"); Connection conn = ds.getConnection(); System.out.println(conn); conn.close(); |
'Dev > Java' 카테고리의 다른 글
eclipse.ini (0) | 2014.09.10 |
---|---|
[Java] 익명 PL/SQL 블럭 실행 (0) | 2014.08.29 |
[Java] byte <-> int (0) | 2014.07.27 |
[Java] bit & shift 연산 (0) | 2014.07.26 |
byte, int, 한글 (0) | 2014.07.26 |
Comments