我正在使用弹簧靴2和石英飞线来制作桌子。当我安排作业时,什么都没有进入数据库。有任何想法吗?我的石英配置在配置应用程序中。有人可以正确安装yml石英配置文件吗?
致谢
答案 0 :(得分:1)
如果您使用的是Spring Boot 2.1,请按如下所示添加application.properties文件
spring.quartz.jdbc.initialize-schema=ALWAYS
spring.quartz.jdbc.schema=classpath:tables_postgres.sql
表格是自动创建的
谢谢
参考: https://docs.spring.io/spring-boot/docs/2.1.0.M1/reference/html/boot-features-quartz.html
答案 1 :(得分:0)
使用springboot应用程序配置Quartz。
org.quartz.scheduler.instanceId = AUTO
org.quartz.scheduler.makeSchedulerThreadDaemon = true
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.makeThreadsDaemons = true
org.quartz.threadPool.threadCount: 20
org.quartz.threadPool.threadPriority: 5
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.jobStore.isClustered = false
org.quartz.jobStore.dataSource = myDs
org.quartz.jobStore.misfireThreshold = 25000
# Configure Datasources
请参阅此演示。
https://www.opencodez.com/java/quartz-scheduler-with-spring-boot.htm https://github.com/davidkiss/spring-boot-quartz-demo