Skip to content

Commit 3717180

Browse files
snicollwilkinsona
authored andcommitted
Create spring-boot-quartz module
1 parent 2c57f73 commit 3717180

File tree

29 files changed

+86
-49
lines changed

29 files changed

+86
-49
lines changed

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ include "spring-boot-project:spring-boot-mail"
7777
include "spring-boot-project:spring-boot-mustache"
7878
include "spring-boot-project:spring-boot-parent"
7979
include "spring-boot-project:spring-boot-pulsar"
80+
include "spring-boot-project:spring-boot-quartz"
8081
include "spring-boot-project:spring-boot-r2dbc"
8182
include "spring-boot-project:spring-boot-reactor-netty"
8283
include "spring-boot-project:spring-boot-rsocket"

spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ dependencies {
3535
optional(project(":spring-boot-project:spring-boot-liquibase"))
3636
optional(project(":spring-boot-project:spring-boot-mail"))
3737
optional(project(":spring-boot-project:spring-boot-neo4j"))
38+
optional(project(":spring-boot-project:spring-boot-quartz"))
3839
optional(project(":spring-boot-project:spring-boot-r2dbc"))
3940
optional(project(":spring-boot-project:spring-boot-reactor-netty"))
4041
optional(project(":spring-boot-project:spring-boot-tomcat"))

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/quartz/QuartzEndpointAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,8 +29,8 @@
2929
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
3030
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
3131
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
32-
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
3332
import org.springframework.boot.context.properties.EnableConfigurationProperties;
33+
import org.springframework.boot.quartz.autoconfigure.QuartzAutoConfiguration;
3434
import org.springframework.context.annotation.Bean;
3535

3636
/**

spring-boot-project/spring-boot-autoconfigure-all/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ dependencies {
160160
optional("org.opensaml:opensaml-core:4.0.1")
161161
optional("org.opensaml:opensaml-saml-api:4.0.1")
162162
optional("org.opensaml:opensaml-saml-impl:4.0.1")
163-
optional("org.quartz-scheduler:quartz")
164163
optional("org.springframework:spring-aspects")
165164
optional("org.springframework:spring-jdbc")
166165
optional("org.springframework:spring-jms")

spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -846,17 +846,6 @@
846846
"level": "error"
847847
}
848848
},
849-
{
850-
"name": "spring.quartz.jdbc.comment-prefix",
851-
"defaultValue": [
852-
"#",
853-
"--"
854-
]
855-
},
856-
{
857-
"name": "spring.quartz.scheduler-name",
858-
"defaultValue": "quartzScheduler"
859-
},
860849
{
861850
"name": "spring.reactor.stacktrace-mode.enabled",
862851
"description": "Whether Reactor should collect stacktrace information at runtime.",

spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring.factories

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ org.springframework.boot.autoconfigure.web.servlet.JspTemplateAvailabilityProvid
1313

1414
# Depends on Database Initialization Detectors
1515
org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitializationDetector=\
16-
org.springframework.boot.autoconfigure.quartz.SchedulerDependsOnDatabaseInitializationDetector,\
1716
org.springframework.boot.autoconfigure.session.JdbcIndexedSessionRepositoryDependsOnDatabaseInitializationDetector

spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration
5252
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration
5353
org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration
5454
org.springframework.boot.autoconfigure.netty.NettyAutoConfiguration
55-
org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration
5655
org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration
5756
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
5857
org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration

spring-boot-project/spring-boot-dependencies/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,6 +2024,7 @@ bom {
20242024
"spring-boot-neo4j",
20252025
"spring-boot-properties-migrator",
20262026
"spring-boot-pulsar",
2027+
"spring-boot-quartz",
20272028
"spring-boot-r2dbc",
20282029
"spring-boot-reactor-netty",
20292030
"spring-boot-rsocket",

spring-boot-project/spring-boot-docs/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ dependencies {
8282
autoConfiguration(project(path: ":spring-boot-project:spring-boot-mustache", configuration: "autoConfigurationMetadata"))
8383
autoConfiguration(project(path: ":spring-boot-project:spring-boot-neo4j", configuration: "autoConfigurationMetadata"))
8484
autoConfiguration(project(path: ":spring-boot-project:spring-boot-pulsar", configuration: "autoConfigurationMetadata"))
85+
autoConfiguration(project(path: ":spring-boot-project:spring-boot-quartz", configuration: "autoConfigurationMetadata"))
8586
autoConfiguration(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "autoConfigurationMetadata"))
8687
autoConfiguration(project(path: ":spring-boot-project:spring-boot-reactor-netty", configuration: "autoConfigurationMetadata"))
8788
autoConfiguration(project(path: ":spring-boot-project:spring-boot-rsocket", configuration: "autoConfigurationMetadata"))
@@ -122,6 +123,7 @@ dependencies {
122123
configurationProperties(project(path: ":spring-boot-project:spring-boot-mustache", configuration: "configurationPropertiesMetadata"))
123124
configurationProperties(project(path: ":spring-boot-project:spring-boot-neo4j", configuration: "configurationPropertiesMetadata"))
124125
configurationProperties(project(path: ":spring-boot-project:spring-boot-pulsar", configuration: "configurationPropertiesMetadata"))
126+
configurationProperties(project(path: ":spring-boot-project:spring-boot-quartz", configuration: "configurationPropertiesMetadata"))
125127
configurationProperties(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "configurationPropertiesMetadata"))
126128
configurationProperties(project(path: ":spring-boot-project:spring-boot-reactor-netty", configuration: "configurationPropertiesMetadata"))
127129
configurationProperties(project(path: ":spring-boot-project:spring-boot-rsocket", configuration: "configurationPropertiesMetadata"))

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/quartz.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ To use a custom script, set the configprop:spring.quartz.jdbc.schema[] property.
3737
Some of the standard scripts – such as those for SQL Server, Azure SQL, and Sybase – cannot be used without modification.
3838
In these cases, make a copy of the script and edit it as directed in the script's comments then set configprop:spring.quartz.jdbc.schema[] to use your customized script.
3939

40-
To have Quartz use a javadoc:javax.sql.DataSource[] other than the application's main javadoc:javax.sql.DataSource[], declare a javadoc:javax.sql.DataSource[] bean, annotating its javadoc:org.springframework.context.annotation.Bean[format=annotation] method with javadoc:org.springframework.boot.autoconfigure.quartz.QuartzDataSource[format=annotation].
40+
To have Quartz use a javadoc:javax.sql.DataSource[] other than the application's main javadoc:javax.sql.DataSource[], declare a javadoc:javax.sql.DataSource[] bean, annotating its javadoc:org.springframework.context.annotation.Bean[format=annotation] method with javadoc:org.springframework.boot.quartz.autoconfigure.QuartzDataSource[format=annotation].
4141
Doing so ensures that the Quartz-specific javadoc:javax.sql.DataSource[] is used by both the javadoc:org.springframework.scheduling.quartz.SchedulerFactoryBean[] and for schema initialization.
42-
Similarly, to have Quartz use a javadoc:org.springframework.transaction.TransactionManager[] other than the application's main javadoc:org.springframework.transaction.TransactionManager[] declare a javadoc:org.springframework.transaction.TransactionManager[] bean, annotating its javadoc:org.springframework.context.annotation.Bean[format=annotation] method with javadoc:org.springframework.boot.autoconfigure.quartz.QuartzTransactionManager[format=annotation].
42+
Similarly, to have Quartz use a javadoc:org.springframework.transaction.TransactionManager[] other than the application's main javadoc:org.springframework.transaction.TransactionManager[] declare a javadoc:org.springframework.transaction.TransactionManager[] bean, annotating its javadoc:org.springframework.context.annotation.Bean[format=annotation] method with javadoc:org.springframework.boot.quartz.autoconfigure.QuartzTransactionManager[format=annotation].
4343

4444
By default, jobs created by configuration will not overwrite already registered jobs that have been read from a persistent job store.
4545
To enable overwriting existing job definitions set the configprop:spring.quartz.overwrite-existing-jobs[] property.
4646

47-
Quartz Scheduler configuration can be customized using `spring.quartz` properties and javadoc:org.springframework.boot.autoconfigure.quartz.SchedulerFactoryBeanCustomizer[] beans, which allow programmatic javadoc:org.springframework.scheduling.quartz.SchedulerFactoryBean[] customization.
47+
Quartz Scheduler configuration can be customized using `spring.quartz` properties and javadoc:org.springframework.boot.quartz.autoconfigure.SchedulerFactoryBeanCustomizer[] beans, which allow programmatic javadoc:org.springframework.scheduling.quartz.SchedulerFactoryBean[] customization.
4848
Advanced Quartz configuration properties can be customized using `spring.quartz.properties.*`.
4949

5050
NOTE: In particular, an javadoc:java.util.concurrent.Executor[] bean is not associated with the scheduler as Quartz offers a way to configure the scheduler through `spring.quartz.properties`.
51-
If you need to customize the task executor, consider implementing javadoc:org.springframework.boot.autoconfigure.quartz.SchedulerFactoryBeanCustomizer[].
51+
If you need to customize the task executor, consider implementing javadoc:org.springframework.boot.quartz.autoconfigure.SchedulerFactoryBeanCustomizer[].
5252

5353
Jobs can define setters to inject data map properties.
5454
Regular beans can also be injected in a similar manner, as shown in the following example:

0 commit comments

Comments
 (0)