当前位置:网站首页>ResourceNotFoundException : Unable to find resource
ResourceNotFoundException : Unable to find resource
2022-06-10 19:19:00 【klzsr】
昨天我自己的代码生成器在进行使用的发现,在工程里面是可以正常读取资源的,
但是打包过后,执行jar包就不行了。始终报如下错误
org.apache.velocity.exception.ResourceNotFoundException : Unable to find resource
在网上搜了很多,但基本没有一个说明白的。
经过再三比对和实验,终于在无意发现了Velocity的一个属性Resource_Loader_path,这个属性设置了资源访问的基本路径。
由于之前默认设置的是“src”目录。
所以在源码工程上运行是没有问题的。由于打包的jar中没有src目录。所以。jar中会包找不到资源。
修改过后一切正常了。
边栏推荐
- latex tips 绝对值的竖线 \left|\right|
- 2022 年 DevOps 路线图|Medium
- 8.4v dual lithium battery professional charging IC (fs4062a)
- localhost和127.0.0.1的区别?
- Batch detection of specified ports of different URLs (py script)
- One question to explain the past and present life of dynamic planning
- Integrate machine learning to make Chrome browser more "understand" you
- 搭建一个BPMN建模的Web服务
- C pointer (interview classic topic exercise)
- One article explains in detail the exploration and practice of eventmesh landing on Huawei cloud
猜你喜欢

PDU session flow

Rotated sorted array

Kp522201a adopts SOT23-6 encapsulated 4.5V to 17V input, 2A output, 600kHz synchronous step-down converter

2022.05.24 (lc_674_longest continuous increasing sequence)
![[FAQ] summary of common problems and solutions during the use of rest API interface of sports health service](/img/9e/9ce804d84fb8ec9221b7c10bbd6c36.jpg)
[FAQ] summary of common problems and solutions during the use of rest API interface of sports health service

PDU会话流程

Zabbix_监控ssh/crond服务-微信告警

During the college entrance examination this year, all examination sites were in good order, and no sensitive cases affecting safety occurred

CVPR 2022丨清华大学提出:无监督域泛化 (UDG)

Which school do you choose after the college entrance examination? VR panoramic campus all-round display
随机推荐
Integrate machine learning to make Chrome browser more "understand" you
安全隐患?意义有限?挡不住真煮迷你厨具火爆618
Easily learn pytoch full convolution neural network to realize expression recognition
MBA-day21 线性规划问题
It is forbidden to throw away rotten software. A guide for software test engineers to advance from elementary level to advanced level will help you promote all the way
Rotated Sorted Array旋转排序数组相关题
Bit operation topic
ZABBIX server trapper Remote Code Execution Vulnerability (cve-2017-2824)
Looking for a room in the graduation season of college students, VR panoramic viewing helps you screen Online
torch.nn.Parameter的简单理解//未完待续,待我看懂这段
Esp8266 system environment setup
2022.05.23 (lc_300_longest increment subsequence)
4.35V锂电充电IC
Trilogy to solve the problem of playing chess first and then
C (pointer 02)
Complete knapsack problem and optimization tips
FS2117升压IC输出5V2.4A同步整流
When can Flink support the SQL client mode? When can I specify the applicati for submitting tasks to yarn
网上开期货账户安全吗?如何避免被骗?
8.4v双节锂电池专业充电ic(FS4062A)