2016-03-19 29 views
0

Mevcut bir project dosyasını özelleştirmek istiyorum. Bu projeyi hatasız bir şekilde oluşturabilir ve dağıtabilirim. Ben hata atıyorYükleme Yükleme İçerik Dosyası Bean.xml

new ClassPathXmlApplicationContext("file:spring/config/BeanLocations.xml"); 

benim BeanLocation.xml yüklemeye çalışırsanız Benim sorundur:

class org.springframework.beans.factory.BeanDefinitionStoreException 
IOException parsing XML document from URL [file:resources/spring/config/BeanLocations.xml]; nested exception is java.io.FileNotFoundException: resources/spring/config/BeanLocations.xml (No such file or directory) 

sen benim sınıf için daha yakından bakmak varsa: o zaman

C:/Program Files/Java/jdk1.8.0_60/lib/tools.jar;C:/Users/admin/workspace/ssf/samples/customcontroller/../../as-common/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../as-shared/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../commons-httpclient-contrib/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../gwt/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../indexer-lucene/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../jboss-portal/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../liferay/liferay/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../liferay-light/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../lucene-contrib/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../main/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../main-minimum/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../portal-module/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../remoting/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../rest-shared/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../slide-webdavclient/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../ssfs/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../taglib/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../tools/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../util/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../util-search/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/../../liferay/teaming/classes;C:/Users/admin/workspace/ssf/samples/customcontroller/src/resources 

Sen C:/Users/admin/workspace/ssf/samples/customcontroller/src/resources/spring/config/BeanLocation.xml

+0

'dosyası kullanılmadan:' Aynı hatayı aldım. – StellaMaris

+0

Olası çoğaltılabilir [Yay mevcut olduğunda bean xml yapılandırma dosyasını bulamıyor] (http://stackoverflow.com/questions/12893760/spring-cannot-find-bean-xml-configuration-file-when-it-does- var) – Cootri

cevap

0

dosyasını içeren C:/Users/admin/workspace/ssf/samples/customcontroller/src/resources bulabilirsiniz. file uri. Bu tür bir uri sınıf yolunu umursamıyor, ancak mevcut klasöre göre bir dosya okuyor.

classpath uri kullanın veya file uri'yi doğru bir yolla ayarlayın.

+0

'classpath *: spring/config/BeanLocations.xml' benim için çalışıyor, ancak' file: 'yoluyla ya da' file: 'öneki olmadan nasıl yükleneceğini bilmek istiyorum. – StellaMaris

+0

"Dosya: spring/config/BeanLocations.xml" yerine kullanmamanızı öneririz. Birçok yol denedim ama hiçbir şey işe yaramadı. – StellaMaris

İlgili konular