| 1 | {{{ |
---|
| 2 | Globals.DriverClassName=com.mysql.jdbc.Driver |
---|
| 3 | Globals.Url=jdbc:mysql://localhost:1623/spring |
---|
| 4 | Globals.UserName=root |
---|
| 5 | Globals.Password=ever1234 |
---|
| 6 | }}} |
---|
| 7 | |
---|
| 8 | {{{ |
---|
| 9 | <?xml version="1.0" encoding="UTF-8"?> |
---|
| 10 | <beans xmlns="http://www.springframework.org/schema/beans" |
---|
| 11 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
---|
| 12 | xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> |
---|
| 13 | |
---|
| 14 | <!-- 환경설정 기본정보를 globals.properties 에서 참조하도록 propertyConfigurer 설정 --> |
---|
| 15 | <bean id="propertyConfigurer" |
---|
| 16 | class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
---|
| 17 | <property name="locations"> |
---|
| 18 | <list> |
---|
| 19 | <value>WEB-INF/db.properties</value> |
---|
| 20 | </list> |
---|
| 21 | </property> |
---|
| 22 | </bean> |
---|
| 23 | |
---|
| 24 | <!-- mysql --> |
---|
| 25 | <bean id="dataSource-mysql" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> |
---|
| 26 | <property name="driverClassName" value="${Globals.DriverClassName}"/> |
---|
| 27 | <property name="url" value="${Globals.Url}" /> |
---|
| 28 | <property name="username" value="${Globals.UserName}"/> |
---|
| 29 | <property name="password" value="${Globals.Password}"/> |
---|
| 30 | </bean> |
---|
| 31 | </beans> |
---|
| 32 | |
---|
| 33 | }}} |