在新版ofbiz 中引入quartz 遇到的问题

245 阅读1分钟

写在开头

在ofbiz 中加入了quartz 功能,导入quartz 的jar包,基本quartz就可以使用了,quartz默认用的是内存存储 #org.quartz.jobStore.class: org.quartz.simpl.RAMJobStore 。我们肯定是想长期保存,便于下次使用 ,改成数据库存储的形式。配置写在quartz.properties ,quartz类库会去 classpath中找这个文件,没有找到的话就就使用RAMJobStore

问题说明

最新版的ofbiz,我把quartz.properties 放在了quartz中的config 里,然后在ofbiz-component里设置了,并不生效

解决过程

	1. 查了一下项目根路径 System.getProperty("user.dir");就是build/lib 下ofbiz.jar
	2. 解压ofibz.jar,没有将quartz.properties作为打进去,这个文件是要在运行期使用的,所以必须打进去
	3. 看到debug.properties打进去了,整个项目查询了一下,找了配置的地方(在build.gradle里设置  sourceSets ),把quartz.properties也包含进去,问题解决