格式化
This commit is contained in:
parent
2f034547e4
commit
f7487353be
|
@ -1,10 +1,10 @@
|
|||
package net.maku.quartz.config;
|
||||
|
||||
import net.maku.framework.common.constant.Constant;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import net.maku.framework.common.constant.Constant;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.util.Properties;
|
||||
|
@ -17,7 +17,6 @@ import java.util.Properties;
|
|||
*/
|
||||
@Configuration
|
||||
public class ScheduleConfig {
|
||||
|
||||
@Value("spring.datasource.driver-class-name")
|
||||
private String driver;
|
||||
|
||||
|
@ -43,10 +42,11 @@ public class ScheduleConfig {
|
|||
prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
|
||||
prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
|
||||
|
||||
//postgreSql数据库配置
|
||||
if(Constant.PGSQL_DRIVER.equals(driver)){
|
||||
// PostgreSQL数据库配置
|
||||
if (Constant.PGSQL_DRIVER.equals(driver)) {
|
||||
prop.put("org.quartz.jobStore.driverDelegateClass", "org.quartz.impl.jdbcjobstore.PostgreSQLDelegate");
|
||||
}
|
||||
|
||||
SchedulerFactoryBean factory = new SchedulerFactoryBean();
|
||||
factory.setSchedulerName("MakuScheduler");
|
||||
factory.setDataSource(dataSource);
|
||||
|
|
Loading…
Reference in New Issue
Block a user