Add Quartz Scheduler support
See gh-4299
This commit is contained in:
committed by
Stephane Nicoll
parent
da6647c19e
commit
9e23206c31
@@ -129,6 +129,11 @@ content into your application; rather pick only the properties that you need.
|
||||
spring.profiles.active= # Comma-separated list (or list if using YAML) of <<howto-set-active-spring-profiles,active profiles>>.
|
||||
spring.profiles.include= # Unconditionally activate the specified comma separated profiles (or list of profiles if using YAML).
|
||||
|
||||
# QUARTZ SCHEDULER ({sc-spring-boot-autoconfigure}/quartz/QuartzProperties.{sc-ext}[QuartzProperties])
|
||||
spring.quartz.initializer.enabled=true # Create the required Quartz Scheduler tables on startup if necessary. Enabled automatically if the schema is configured.
|
||||
spring.quartz.properties.*= # Additional Quartz Scheduler properties.
|
||||
spring.quartz.schema=classpath:org/quartz/impl/jdbcjobstore/tables_@@platform@@.sql # Path to the SQL file to use to initialize the database schema.
|
||||
|
||||
# Reactor
|
||||
spring.reactor.stacktrace-mode.enabled=false # Set whether Reactor should collect stacktrace information at runtime.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
= Spring Boot Reference Guide
|
||||
Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson; Marcel Overdijk; Christian Dupuis; Sébastien Deleuze; Michael Simons
|
||||
Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson; Marcel Overdijk; Christian Dupuis; Sébastien Deleuze; Michael Simons; Vedran Pavić
|
||||
:doctype: book
|
||||
:toc:
|
||||
:toclevels: 4
|
||||
|
||||
@@ -5151,6 +5151,37 @@ caching is enabled.
|
||||
|
||||
|
||||
|
||||
[[boot-features-quartz]]
|
||||
== Quartz Scheduler
|
||||
|
||||
If Quartz Scheduler and the relevant libraries (as defined by `spring-boot-starter-quartz`)
|
||||
are on the classpath, Spring Boot will auto-configure a `SchedulerFactoryBean` which
|
||||
provides `Scheduler` instance that you can inject in your application.
|
||||
|
||||
Beans of following types will be automatically picked up and added to
|
||||
`SchedulerFactoryBean`:
|
||||
|
||||
* `JobDetail`
|
||||
* `Calendar`
|
||||
* `Trigger`
|
||||
|
||||
By default, an in-memory `JobStore` will be used. However, if `DataSource` bean is
|
||||
available in your application, Quartz Scheduler will be configured with a persistent
|
||||
`JobStore`.
|
||||
|
||||
When using a persistent `JobStore`, Quartz database schema can be initialized using
|
||||
`QuartzDatabaseInitializer` if the location of schema script is configured using
|
||||
`spring.quartz.schema` property.
|
||||
|
||||
Quartz Scheduler configuration can also be customized using Quartz configuration properties
|
||||
(see `spring.quartz.properties.*`) and `SchedulerFactoryBeanCustomizer` beans which
|
||||
allows programmatic `SchedulerFactoryBean` customization.
|
||||
|
||||
Spring Boot also configures `JobFactory` that is `@Autowire` capable so you can easily
|
||||
inject beans from `applicationContext` and use them in your Quartz jobs.
|
||||
|
||||
|
||||
|
||||
[[boot-features-integration]]
|
||||
== Spring Integration
|
||||
Spring Boot offers several conveniences for working with Spring Integration, including
|
||||
|
||||
Reference in New Issue
Block a user