0
클래스 경로에 appcontext.xml 파일이 있습니다. appcontext.xml의 config.properties 파일을 사용하여 데이터베이스 속성을 읽습니다. .xml 파일의 .properties 파일 읽기
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [C:/prov-eng-2/prov-eng/provfwk/pf-core/src/main/config/core/config.properties] cannot be opened because it does not exist
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:89) ~[spring-beans-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:265) ~[spring-context-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:162) ~[spring-context-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609) ~[spring-context-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) ~[spring-context-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) ~[spring-context-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) ~[spring-context-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at com.gsl.pf.core.AdaptorManager.<init>(AdaptorManager.java:28) ~[pf-core-0.1.0-SNAPSHOT.jar:na]
at com.gsl.pf.core.AdaptorManager.getInstance(AdaptorManager.java:34) ~[pf-core-0.1.0-SNAPSHOT.jar:na]
at com.gsl.pf.fwk.FrameworkLoader.initialize(FrameworkLoader.java:35) ~[pf-fwk-0.1.0-SNAPSHOT.jar:na]
at com.gsl.pf.scimsvr.app.Loader.initialize(Loader.java:32) ~[classes/:na]
at com.gsl.pf.scimsvr.app.ScimServer.start(ScimServer.java:62) [classes/:na]
at com.gsl.pf.scimsvr.app.ScimServer.main(ScimServer.java:47) [classes/:na]
Caused by: java.io.FileNotFoundException: class path resource [C:/prov-eng-2/prov-eng/provfwk/pf-core/src/main/config/core/config.properties] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158) ~[spring-core-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.core.io.support.EncodedResource.getInputStream(EncodedResource.java:143) ~[spring-core-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:98) ~[spring-core-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:175) ~[spring-core-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:156) ~[spring-core-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:80) ~[spring-beans-4.0.3.RELEASE.jar:4.0.3.RELEASE]
... 12 common frames omitted
는 다른 존재, 속성 파일은 SRC/메인/설정/코어/config.properties 구조에 저장되고 나는, 같은 XML 파일에
<property name="locations">
<list>
<value>${PF_CORE_HOME}/config/core/config.properties</value>
</list>
</property>
그것을 사용하고 있지만 오류 제공 .xml의 .property 파일을 읽는 방법.
속성을로드 할 수 없습니다. 중첩 예외는 java.io.FileNotFoundException : 클래스 경로 리소스 [C : /prov-eng-2/prov-eng/provfwk/pf-core/src/main/config/core/config.properties]가 열리지 않기 때문에 존재하지 않음 – Maksym
예외를 읽었습니까? – Maksym
' classpath : /core/config.properties '클래스 경로에 파일을 복사하면. –