--confprofile/datasource-dev.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
http://www.springframework.org/schema/beans/spring-beans.xsd"
profile="!prod">
<bean id="connProvider" class="net.madvirus.spring4.chap04.JdbcConnectionProvider"
init-method="init">
<property name="driver" value="${db.driver}" />
<property name="url" value="${db.jdbcUrl}" />
<property name="user" value="${db.user}" />
<property name="password">
<value>${db.password}</value>
</property>
</bean>
</beans>
--db.properties
db.driver=com.mysql.Driver
db.jdbcUrl=jdbc:mysql://host/test
db.user=madvirus
db.password=bkchoi
여기에서 confprofile/datasource-dev.xml 에서 db.properties 를 읽어들이는 코드가 없는데 어떻게 db.properties 에 있는 값을 placeholder로 이용할수 있는건가요??
댓글 0