PropertyPlaceholderConfigurer와 관련하여 의심의 여지가 있습니다. 아래는 application-context.xml 파일의 구성입니다. 문서에 따르면 먼저 {user.home}/conf 디렉토리에서 application.properties를 찾습니다. 존재하지 않는다면 클래스 패스에서로드됩니다.PropertyPlaceholderConfigurer가 등록 정보 파일을로드하는 방법은 무엇입니까?
하나의 키 값이 {user.home}/conf 디렉토리의 application.properties 파일에 없지만 classpath의 application.properties에 하나의 질문이 있습니다. 그렇다면 어떻게 그 핵심 가치를 확인하고 적재 할 것인가?
죄송합니다.
<bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:application.properties</value>
<value>file:///${user.home}/conf/application.properties</value>
</list>
</property>
두 개의 .properties를 사용할 수 있으면 모든 키가로드됩니다. –