application.yml文件中配置
- # 数据源配置
- spring:
- datasource:
- druid:
- # 主库数据源
- master:
- url: jdbc:mysql://172.0.0.1:3306/demo?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
- username: demo
- password: demo123
- # 开启Quartz集群
- quartz:
- #持久化到数据库方式
- job-store-type: jdbc
- jdbc:
- # 每次启动都初始化数据库,3种模式(ALWAYS、EMBEDDED、NEVER)
- initialize-schema: never
- properties:
- org:
- quartz:
- scheduler:
- instanceName: IocScheduler
- instanceId: AUTO
- jobStore:
- driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
- tablePrefix: QRTZ_
- isClustered: true
- clusterCheckinInterval: 10000
- useProperties: false