저는 스프링 웹 MVC 프로젝트를 사용하고 ormlite.xml
및 jdbc.properties
을 포함하여 모든 봄 관련 파일을 WEB-INF\spring
아래에 배치했습니다.봄 컨텍스트 구성 파일에서 속성 파일을 찾는 방법
지금 나는 ormlite.xml
에서 jdbc.properties
파일, Like this 찾으려 :
<context:property-placeholder location="/WEB-INF/spring/jdbc.properties"/>
을하지만 응용 프로그램을 실행할 때, 그것은 나에게 그런 말 것 :
Could not load properties
은 할 수 없습니다 특성 파일을 찾으십시오.
무엇이 문제입니까?
<context:property-placeholder location="/WEB-INF/spring/jdbc.properties"/>
사용 :
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
p:location="/WEB-INF/spring/jdbc.properties"/>
그리고 당신의 속성은 봄 파일에서 사용할 수 및 네임 스페이스 추가하는 것을 잊지 마세요 :
작동하지 않습니다. 다음을보십시오 : [http://i.imgur.com/QmpQv6K.png] – hguser
어떤 버전의 스프링을 사용하고 있습니까? –
나는 3.2.3.RELEASE – hguser