Java/Spring

xml에서 properties 설정 사용하기

innocent_k 2015. 5. 11. 16:05

<bean id="propertyPlaceholderConfigurer"

        class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">

        <property name="locations">

            <value>classpath:/properties/db.properties</value>   

        </property>

    </bean>


상기 등록 후 


<property name="username" value="${username}" />