Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
fa47073d
Commit
fa47073d
authored
Oct 09, 2018
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.0.x'
parents
602f23c3
c6fdb4f0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
QuartzAutoConfiguration.java
...rk/boot/autoconfigure/quartz/QuartzAutoConfiguration.java
+2
-0
SchedulerFactoryBeanCustomizer.java
.../autoconfigure/quartz/SchedulerFactoryBeanCustomizer.java
+8
-1
spring-boot-features.adoc
...ing-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+5
-0
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/quartz/QuartzAutoConfiguration.java
View file @
fa47073d
...
...
@@ -39,6 +39,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.io.ResourceLoader
;
import
org.springframework.scheduling.quartz.SchedulerFactoryBean
;
import
org.springframework.transaction.PlatformTransactionManager
;
...
...
@@ -132,6 +133,7 @@ public class QuartzAutoConfiguration {
protected
static
class
JdbcStoreTypeConfiguration
{
@Bean
@Order
(
0
)
public
SchedulerFactoryBeanCustomizer
dataSourceCustomizer
(
QuartzProperties
properties
,
DataSource
dataSource
,
@QuartzDataSource
ObjectProvider
<
DataSource
>
quartzDataSource
,
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/quartz/SchedulerFactoryBeanCustomizer.java
View file @
fa47073d
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -16,12 +16,19 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
quartz
;
import
javax.sql.DataSource
;
import
org.springframework.scheduling.quartz.SchedulerFactoryBean
;
/**
* Callback interface that can be implemented by beans wishing to customize the Quartz
* {@link SchedulerFactoryBean} before it is fully initialized, in particular to tune its
* configuration.
* <p>
* For customization of the {@link DataSource} used by Quartz, use of
* {@link QuartzDataSource @QuartDataSource} is preferred. It will ensure consistent
* customization of both the {@link SchedulerFactoryBean} and the
* {@link QuartzDataSourceInitializer}.
*
* @author Vedran Pavic
* @since 2.0.0
...
...
spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
fa47073d
...
...
@@ -6253,6 +6253,11 @@ NOTE: By default, the database is detected and initialized by using the standard
provided with the Quartz library. It is also possible to provide a custom script by
setting the `spring.quartz.jdbc.schema` property.
To have Quartz use a `DataSource` other than the application's main `DataSource`, declare
a `DataSource` bean, annotating its `@Bean` method with `@QuartzDataSource`. Doing so
ensures that the Quartz-specific `DataSource` is used by both the `SchedulerFactoryBean`
and for schema initialization.
By default, jobs created by configuration will not overwrite already registered jobs that
have been read from a persistent job store. To enable overwriting existing job definitions
set the `spring.quartz.overwrite-existing-jobs` property.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment