Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 为什么Quartz没有写入mysql默认Quartz表?_Spring Boot_Quartz Scheduler - Fatal编程技术网

Spring boot 为什么Quartz没有写入mysql默认Quartz表?

Spring boot 为什么Quartz没有写入mysql默认Quartz表?,spring-boot,quartz-scheduler,Spring Boot,Quartz Scheduler,我使用spring boot 2和quartz,flyway制作桌子。当我在db中调度作业时,没有任何内容。有什么想法吗?我的石英配置在配置应用程序中。有人能修改yml石英配置文件吗 请使用springboot应用程序配置Quartz org.quartz.scheduler.instanceId = AUTO org.quartz.scheduler.makeSchedulerThreadDaemon = true org.quartz.threadPool.class = org.quart

我使用spring boot 2和quartz,flyway制作桌子。当我在db中调度作业时,没有任何内容。有什么想法吗?我的石英配置在配置应用程序中。有人能修改yml石英配置文件吗


请使用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  
请参阅此演示


如果您使用的是spring boot 2.1,请按如下方式添加application.properties文件

spring.quartz.jdbc.initialize-schema=ALWAYS
spring.quartz.jdbc.schema=classpath:tables_postgres.sql
这些表是自动创建的

谢谢

参考资料:

您是否设置了spring.quartz.job store type=jdbc和spring.quartz.jdbc.initialize schema=always?您应该在