1. 일단 기본으로 war 파일 안에 프로퍼티 파일이 하나 있어야 함
2. 이유는 외부 프로퍼티 파일이 없을 때를 대비해서 이다.
<bean id="requiredProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>/WEB-INF/properties/*.properties</value>
</list>
</property>
</bean>
<context:property-placeholder properties-ref="requiredProperties" ignore-resource-not-found="true" location="file:${catalina.base}/mydb.properties" />
'개발 > Spring' 카테고리의 다른 글
[Spring-remote] Hessian 예제 (0) | 2018.02.15 |
---|---|
@RestController (0) | 2018.02.15 |
@responsebody (0) | 2018.02.15 |
국제화 (0) | 2018.02.15 |
datasource의 value 읽어오기 (0) | 2018.02.15 |