quartz持久化之配置文件路径

来源:互联网 发布:vbscript需要什么软件 编辑:程序博客网 时间:2024/06/07 03:04

<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">StdSchedulerFactory文件中,关于quartz.properties配置文件读取:</span>

 String requestedFile = System.getProperty(PROPERTIES_FILE);        String propFileName = requestedFile != null ? requestedFile                : "quartz.properties";        File propFile = new File(propFileName);

要么从根目录取,要么从system.property里取:

public static final String PROPERTIES_FILE = "org.quartz.properties";

 * <p>
     * By default a properties file named "quartz.properties" is loaded from
     * the 'current working directory'. If that fails, then the
     * "quartz.properties" file located (as a resource) in the org/quartz
     * package is loaded. If you wish to use a file other than these defaults,
     * you must define the system property 'org.quartz.properties' to point to
     * the file you want.
     * </p>

0 0
原创粉丝点击