300.9.5.4. 적절한 자리 표시자 구성
다음은 클래스 경로에서 myproperties.properties 를 로드하도록 속성 자리 표시자를 설정하기 위한 web.xml 구성의 스니펫입니다.
<!-- setup property placeholder to load properties from classpath -->
<!-- we do this by setting the param-name with propertyPlaceholder. as prefix and then any options such as location, cache etc -->
<context-param>
<param-name>propertyPlaceholder.location</param-name>
<param-value>classpath:myproperties.properties</param-value>
</context-param>
<!-- for example to disable cache on properties component, you do -->
<context-param>
<param-name>propertyPlaceholder.cache</param-name>
<param-value>false</param-value>
</context-param>