Heroku无法找到XML配置文件 [英] Heroku Unable To Find XML Config File

查看:116
本文介绍了Heroku无法找到XML配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


$ b

java.io.FileNotFoundException:类路径资源[ com / myname / myapp / config / dao-context.xml



该文件绝对存在,位于GIT中,应用程序本地成功运行。



任何想法发生在这里? 为未来的访问者对于这个问题,我通过将DAO XML配置文件转换为Java Config方法克服了这个问题,因此Spring不再需要该XML文件。这并没有直接解决无法找到XML文件的问题,但额外的好处是我现在使用的是更现代,更简洁的Java Config方法。


I uploaded a Spring application to Heroku but the application crashed with the following error:

java.io.FileNotFoundException: class path resource [com/myname/myapp/config/dao-context.xml

The file is definitely there, and it is in GIT, and the app runs successfully locally.

Any ideas what is happening here?

解决方案

For future visitors to this question, I overcame the problem by converting my DAO XML config file to the Java Config method, therefore Spring no longer required that XML file. This didn't directly solve the issue of being unable to find the XML file, but the added benefit is that I am now using the more modern and less verbose Java Config method.

这篇关于Heroku无法找到XML配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆