Polish "Harmonize database initializers"

Closes gh-9752
This commit is contained in:
Stephane Nicoll
2017-08-18 17:02:34 +02:00
parent 14b7be8325
commit 394371eb73
36 changed files with 123 additions and 108 deletions

View File

@@ -132,7 +132,7 @@ content into your application; rather pick only the properties that you need.
# QUARTZ SCHEDULER ({sc-spring-boot-autoconfigure}/quartz/QuartzProperties.{sc-ext}[QuartzProperties])
spring.quartz.job-store-type=memory # Quartz job store type.
spring.quartz.properties.*= # Additional Quartz Scheduler properties.
spring.quartz.jdbc.initialize-schema=embedded # Quartz Scheduler database schema initialization mode.
spring.quartz.jdbc.initialize-schema=embedded # Database schema initialization mode.
spring.quartz.jdbc.schema=classpath:org/quartz/impl/jdbcjobstore/tables_@@platform@@.sql # Path to the SQL file to use to initialize the database schema.
# Reactor
@@ -416,7 +416,7 @@ content into your application; rather pick only the properties that you need.
# SPRING SESSION ({sc-spring-boot-autoconfigure}/session/SessionProperties.{sc-ext}[SessionProperties])
spring.session.hazelcast.flush-mode=on-save # Sessions flush mode.
spring.session.hazelcast.map-name=spring:session:sessions # Name of the map used to store sessions.
spring.session.jdbc.initialize-schema=embedded # Spring Session database schema initialization mode.
spring.session.jdbc.initialize-schema=embedded # Database schema initialization mode.
spring.session.jdbc.schema=classpath:org/springframework/session/jdbc/schema-@@platform@@.sql # Path to the SQL file to use to initialize the database schema.
spring.session.jdbc.table-name=SPRING_SESSION # Name of database table used to store sessions.
spring.session.redis.flush-mode=on-save # Sessions flush mode.
@@ -942,14 +942,14 @@ content into your application; rather pick only the properties that you need.
spring.artemis.user= # Login user of the broker.
# SPRING BATCH ({sc-spring-boot-autoconfigure}/batch/BatchProperties.{sc-ext}[BatchProperties])
spring.batch.initialize-schema=embedded # Spring Batch database schema initialization mode.
spring.batch.initialize-schema=embedded # Database schema initialization mode.
spring.batch.job.enabled=true # Execute all Spring Batch jobs in the context on startup.
spring.batch.job.names= # Comma-separated list of job names to execute on startup (For instance `job1,job2`). By default, all Jobs found in the context are executed.
spring.batch.schema=classpath:org/springframework/batch/core/schema-@@platform@@.sql # Path to the SQL file to use to initialize the database schema.
spring.batch.table-prefix= # Table prefix for all the batch meta-data tables.
# SPRING INTEGRATION ({sc-spring-boot-autoconfigure}/integration/IntegrationProperties.{sc-ext}[IntegrationProperties])
spring.integration.jdbc.initialize-schema=embedded # Spring Integration database schema initialization mode.
spring.integration.jdbc.initialize-schema=embedded # Database schema initialization mode.
spring.integration.jdbc.schema=classpath:org/springframework/integration/jdbc/schema-@@platform@@.sql # Path to the SQL file to use to initialize the database schema.
# JMS ({sc-spring-boot-autoconfigure}/jms/JmsProperties.{sc-ext}[JmsProperties])

View File

@@ -1935,12 +1935,16 @@ data.
[[howto-initialize-a-spring-batch-database]]
=== Initialize a Spring Batch database
If you are using Spring Batch then it comes pre-packaged with SQL initialization scripts
for most popular database platforms. Spring Boot will detect your database type, and
execute those scripts by default when using an embedded database, and in this case will
switch the fail fast setting to false (errors are logged but do not prevent the
application from starting). This is because the scripts are known to be reliable and
generally do not contain bugs, so errors are ignorable, and ignoring them makes the
scripts idempotent. You can switch off the initialization explicitly using
for most popular database platforms. Spring Boot can detect your database type and
execute those scripts on startup. If you are using an embedded database this happens
by default. You can also enable it for any database type:
[indent=0,subs="verbatim,quotes,attributes"]
----
spring.batch.initialize-schema=always
----
You can also switch off the initialization explicitly using
`spring.batch.initialize-schema=never`.