Quartz Scheduler: How to dynamically read a quartz property from Java via API?

孤街醉人 提交于 2019-12-06 16:13:25

You can just add that property to your quartz.properties. For example:

org.quartz.threadPool.threadPriority=3

For more information, see here and configuration documentation

EDIT: To read properties at runtime, you can use Properties. Here's a sample snippet of code you can use:

Properties p = new Properties();
p.load("/tmp/quartz.properties"); // path to your properties file
System.out.println(p.getProperty("org.quartz.threadPool.threadPriority"); // prints 3
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!