本站首页    管理页面    写新日志    退出

The Neurotic Fishbowl

[/*Java*/]jar中的资源访问
nybon 发表于 2005/5/17 22:52:24

今天在做Spring+iBatis的一个部署,本来已经调试好了,但是打包成jar发布的时候发现了使用Spring的ClassPathResource无法找到iBatis的配置文件.在Google上面猛搜了一阵也没有发现到底怎么解决(还搜到一个误导我的message,说是在jar的manifest.mf里面可以声明,害我浪费了一个多小时看),最后搜来搜去搜到了Spring的API doc: public class ClassPathResourceextends AbstractResource Resource implementation for class path resources. Uses either the thread context class loader, a given ClassLoader or a given Class for loading resources.   Supports resolution as java.io.File if the class path resource resides in the file system, but not for resources in a JAR. Always supports resolution as URL. 原来用这个ClassPathResource是没可能在Spring里面配出来jar里面的资源访问的,痛.只能再想办法了

阅读全文(2921) | 回复(0) | 编辑 | 精华

 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)

 
 



The Neurotic Fishbowl

.: 公告

This blog focuses on:

Semantic Web && Java Technology


Bloginess

«September 2025»
123456
78910111213
14151617181920
21222324252627
282930

.: 我的分类(专题)

首页(171)
/*SemanticWeb*/(34)
/*Java*/(74)
/*FreeComments*/(59)
/*Agent*/(4)


In the Bowl

.: 最新日志

The End
使用Google Trends进行选型
怎样才能称为一次新的版本发行?
如何防止RSS信息过载
使用Excel作为用户接口
如何有效地报告Bug
sourceforge再次被封
趣文两篇
编写Firefox扩展
Jetspeed心得随笔


.: 最新回复

回复:Google API与yahoo 
回复:JADE 3.3的bug
回复:JADE 3.3的bug
回复:JADE 3.3的bug
回复:JADE 3.3的bug
回复:Jbpm和Shark比较的feat
回复:JADE 3.3的bug
回复:JADE 3.3的bug
回复:[转]批判性地看待一种可行的表示技
回复:JIRA破解


The Fishkeeper
blog名称:SW Portal
日志总数:171
评论数量:219
留言数量:8
访问次数:1048773
建立时间:2004年10月30日



Text Me

.: 留言板

签写新留言

路过
路过
页脚问题
RE:请问一下你的主页的下面部分是怎么关
请问一下你的主页的下面部分是怎么关闭的?
我是做Mobile Agent的
Gmail
不错
不错啊小倪同学


Other Fish in the Sea

.: 链接





站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.035 second(s), page refreshed 144788384 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号