PropertyPlaceholderConfigurer를 사용하여 내 앱 구성을 읽으려고합니다. 기본적으로 WEB-INF/config/config.properties
에는 다른 등록 정보 파일의 파일 시스템 위치가 들어있는 첫 번째 구성 파일이 있습니다 (따라서 앱 배포 또는 업데이트 중에는 삭제되지 않습니다). 나는이 servlet-context.xml
에서 설정하지만 첫 번째 작품이하려고 해요 :원하는 방식으로 작동하도록 PropertyPlaceholderConfigurer를 가져올 수 없습니다.
propertyConfigurerInternal
)는 문제없이 생성하지만, 두 번째는 다음과 같이 실패
<bean id="propertyConfigurerInternal"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>/WEB-INF/config/config.properties</value>
</property>
</bean>
<bean id="propertyConfigurerExternal"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
depends-on="propertyConfigurerInternal">
<property name="location">
<value>file:${baseDataFolder}/jaccise.conf</value>
</property>
</bean>
:
org.springframework.beans.factory.BeanInitializationException
: 속성을로드 할 수 없습니다.${baseDataFolder}\jaccise.conf
(Impossibile trovare 위원장 percorso specificato) < - ... 나는이 문제를 해결하려면 어떻게해야 작동하지 않는 EL 표현식과 같은
"지정된 경로에 파일을 찾을 수 없습니다"의미 : 중첩 된 예외 java.io.FileNotFoundException
입니까?
나는 이것을 할 수 있다고 생각하지 않습니다. 모든 PropertyPlaceholderConfigurer 빈들은 함께 초기화되고 * then * 대체가 일어난다. 그래서 그들은 서로를 참조 할 수 없습니다. – skaffman
그러면 어떻게 이런 식으로 해결할 수 있을까요? – gotch4