Common Application properties

Various properties can be specified inside your application.properties file, inside your application.yml file, or as command line switches. This appendix provides a list of common Spring Boot properties and references to the underlying classes that consume them.

Spring Boot provides various conversion mechanism with advanced value formatting, make sure to review the properties conversion section.
Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list. Also, you can define your own properties.

1. Core Properties

Key Default Value Description

debug

false

Enable debug logs.

info.*

Arbitrary properties to add to the info endpoint.

logging.charset.console

Charset to use for console output.

logging.charset.file

Charset to use for file output.

logging.config

Location of the logging configuration file. For instance, `classpath:logback.xml` for Logback.

logging.exception-conversion-word

%wEx

Conversion word used when logging exceptions.

logging.file.name

Log file name (for instance, `myapp.log`). Names can be an exact location or relative to the current directory.

logging.file.path

Location of the log file. For instance, `/var/log`.

logging.group.*

Log groups to quickly change multiple loggers at the same time. For instance, `logging.group.db=org.hibernate,org.springframework.jdbc`.

logging.level.*

Log levels severity mapping. For instance, `logging.level.org.springframework=DEBUG`.

logging.logback.rollingpolicy.clean-history-on-start

false

Whether to clean the archive log files on startup.

logging.logback.rollingpolicy.file-name-pattern

${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz

Pattern for rolled-over log file names.

logging.logback.rollingpolicy.max-file-size

10MB

Maximum log file size.

logging.logback.rollingpolicy.max-history

7

Maximum number of days archive log files are kept.

logging.logback.rollingpolicy.total-size-cap

0B

Total size of log backups to be kept.

logging.pattern.console

%clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}

Appender pattern for output to the console. Supported only with the default Logback setup.

logging.pattern.dateformat

yyyy-MM-dd HH:mm:ss.SSS

Appender pattern for log date format. Supported only with the default Logback setup.

logging.pattern.file

%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}

Appender pattern for output to a file. Supported only with the default Logback setup.

logging.pattern.level

%5p

Appender pattern for log level. Supported only with the default Logback setup.

logging.register-shutdown-hook

false

Register a shutdown hook for the logging system when it is initialized.

spring.aop.auto

true

Add @EnableAspectJAutoProxy.

spring.aop.proxy-target-class

true

Whether subclass-based (CGLIB) proxies are to be created (true), as opposed to standard Java interface-based proxies (false).

spring.application.admin.enabled

false

Whether to enable admin features for the application.

spring.application.admin.jmx-name

org.springframework.boot:type=Admin,name=SpringApplication

JMX name of the application admin MBean.

spring.application.name

Application name.

spring.autoconfigure.exclude

Auto-configuration classes to exclude.

spring.banner.charset

UTF-8

Banner file encoding.

spring.banner.image.bitdepth

4

Bit depth to use for ANSI colors. Supported values are 4 (16 color) or 8 (256 color).

spring.banner.image.height

Height of the banner image in chars (default based on image height).

spring.banner.image.invert

false

Whether images should be inverted for dark terminal themes.

spring.banner.image.location

classpath:banner.gif

Banner image file location (jpg or png can also be used).

spring.banner.image.margin

2

Left hand image margin in chars.

spring.banner.image.pixelmode

TEXT

Pixel mode to use when rendering the image.

spring.banner.image.width

76

Width of the banner image in chars.

spring.banner.location

classpath:banner.txt

Banner text resource location.

spring.beaninfo.ignore

true

Whether to skip search of BeanInfo classes.

spring.codec.log-request-details

false

Whether to log form data at DEBUG level, and headers at TRACE level.

spring.codec.max-in-memory-size

Limit on the number of bytes that can be buffered whenever the input stream needs to be aggregated. This applies only to the auto-configured WebFlux server and WebClient instances. By default this is not set, in which case individual codec defaults apply. Most codecs are limited to 256K by default.

spring.config.activate.on-cloud-platform

Required cloud platform for the document to be included.

spring.config.activate.on-profile

Profile expressions that should match for the document to be included.

spring.config.additional-location

Config file locations used in addition to the defaults.

spring.config.import

Import additional config data.

spring.config.location

Config file locations that replace the defaults.

spring.config.name

application

Config file name.

spring.config.use-legacy-processing

false

Whether to enable configuration data processing legacy mode.

spring.info.build.encoding

UTF-8

File encoding.

spring.info.build.location

classpath:META-INF/build-info.properties

Location of the generated build-info.properties file.

spring.info.git.encoding

UTF-8

File encoding.

spring.info.git.location

classpath:git.properties

Location of the generated git.properties file.

spring.jmx.default-domain

JMX domain name.

spring.jmx.enabled

false

Expose management beans to the JMX domain.

spring.jmx.server

mbeanServer

MBeanServer bean name.

spring.jmx.unique-names

false

Whether unique runtime object names should be ensured.

spring.lifecycle.timeout-per-shutdown-phase

30s

Timeout for the shutdown of any phase (group of SmartLifecycle beans with the same 'phase' value).

spring.main.allow-bean-definition-overriding

false

Whether bean definition overriding, by registering a definition with the same name as an existing definition, is allowed.

spring.main.banner-mode

console

Mode used to display the banner when the application runs.

spring.main.cloud-platform

Override the Cloud Platform auto-detection.

spring.main.lazy-initialization

false

Whether initialization should be performed lazily.

spring.main.log-startup-info

true

Whether to log information about the application when it starts.

spring.main.register-shutdown-hook

true

Whether the application should have a shutdown hook registered.

spring.main.sources

Sources (class names, package names, or XML resource locations) to include in the ApplicationContext.

spring.main.web-application-type

Flag to explicitly request a specific type of web application. If not set, auto-detected based on the classpath.

spring.mandatory-file-encoding

Expected character encoding the application must use.

spring.messages.always-use-message-format

false

Whether to always apply the MessageFormat rules, parsing even messages without arguments.

spring.messages.basename

messages

Comma-separated list of basenames (essentially a fully-qualified classpath location), each following the ResourceBundle convention with relaxed support for slash based locations. If it doesn't contain a package qualifier (such as "org.mypackage"), it will be resolved from the classpath root.

spring.messages.cache-duration

Loaded resource bundle files cache duration. When not set, bundles are cached forever. If a duration suffix is not specified, seconds will be used.

spring.messages.encoding

UTF-8

Message bundles encoding.

spring.messages.fallback-to-system-locale

true

Whether to fall back to the system Locale if no files for a specific Locale have been found. if this is turned off, the only fallback will be the default file (e.g. "messages.properties" for basename "messages").

spring.messages.use-code-as-default-message

false

Whether to use the message code as the default message instead of throwing a "NoSuchMessageException". Recommended during development only.

spring.output.ansi.enabled

detect

Configures the ANSI output.

spring.pid.fail-on-write-error

Fails if ApplicationPidFileWriter is used but it cannot write the PID file.

spring.pid.file

Location of the PID file to write (if ApplicationPidFileWriter is used).

spring.profiles.active

Comma-separated list of active profiles. Can be overridden by a command line switch.

spring.profiles.group.*

Profile groups to define a logical name for a related group of profiles.

spring.profiles.include

Unconditionally activate the specified comma-separated list of profiles (or list of profiles if using YAML).

spring.quartz.auto-startup

true

Whether to automatically start the scheduler after initialization.

spring.quartz.jdbc.comment-prefix

[#, --]

Prefixes for single-line comments in SQL initialization scripts.

spring.quartz.jdbc.initialize-schema

embedded

Database schema initialization mode.

spring.quartz.jdbc.schema

classpath:org/quartz/impl/jdbcjobstore/[email protected] @[email protected] @.sql

Path to the SQL file to use to initialize the database schema.

spring.quartz.job-store-type

memory

Quartz job store type.

spring.quartz.overwrite-existing-jobs

false

Whether configured jobs should overwrite existing job definitions.

spring.quartz.properties.*

Additional Quartz Scheduler properties.

spring.quartz.scheduler-name

quartzScheduler

Name of the scheduler.

spring.quartz.startup-delay

0s

Delay after which the scheduler is started once initialization completes. Setting this property makes sense if no jobs should be run before the entire application has started up.

spring.quartz.wait-for-jobs-to-complete-on-shutdown

false

Whether to wait for running jobs to complete on shutdown.

spring.reactor.debug-agent.enabled

true

Whether the Reactor Debug Agent should be enabled when reactor-tools is present.

spring.task.execution.pool.allow-core-thread-timeout

true

Whether core threads are allowed to time out. This enables dynamic growing and shrinking of the pool.

spring.task.execution.pool.core-size

8

Core number of threads.

spring.task.execution.pool.keep-alive

60s

Time limit for which threads may remain idle before being terminated.

spring.task.execution.pool.max-size

Maximum allowed number of threads. If tasks are filling up the queue, the pool can expand up to that size to accommodate the load. Ignored if the queue is unbounded.

spring.task.execution.pool.queue-capacity

Queue capacity. An unbounded capacity does not increase the pool and therefore ignores the "max-size" property.

spring.task.execution.shutdown.await-termination

false

Whether the executor should wait for scheduled tasks to complete on shutdown.

spring.task.execution.shutdown.await-termination-period

Maximum time the executor should wait for remaining tasks to complete.

spring.task.execution.thread-name-prefix

task-

Prefix to use for the names of newly created threads.

spring.task.scheduling.pool.size

1

Maximum allowed number of threads.

spring.task.scheduling.shutdown.await-termination

false

Whether the executor should wait for scheduled tasks to complete on shutdown.

spring.task.scheduling.shutdown.await-termination-period

Maximum time the executor should wait for remaining tasks to complete.

spring.task.scheduling.thread-name-prefix

scheduling-

Prefix to use for the names of newly created threads.

trace

false

Enable trace logs.

2. Cache Properties

Key Default Value Description

spring.cache.cache-names

Comma-separated list of cache names to create if supported by the underlying cache manager. Usually, this disables the ability to create additional caches on-the-fly.

spring.cache.caffeine.spec

The spec to use to create caches. See CaffeineSpec for more details on the spec format.

spring.cache.couchbase.expiration

Entry expiration. By default the entries never expire. Note that this value is ultimately converted to seconds.

spring.cache.ehcache.config

The location of the configuration file to use to initialize EhCache.

spring.cache.infinispan.config

The location of the configuration file to use to initialize Infinispan.

spring.cache.jcache.config

The location of the configuration file to use to initialize the cache manager. The configuration file is dependent of the underlying cache implementation.

spring.cache.jcache.provider

Fully qualified name of the CachingProvider implementation to use to retrieve the JSR-107 compliant cache manager. Needed only if more than one JSR-107 implementation is available on the classpath.

spring.cache.redis.cache-null-values

true

Allow caching null values.

spring.cache.redis.enable-statistics

false

Whether to enable cache statistics.

spring.cache.redis.key-prefix

Key prefix.

spring.cache.redis.time-to-live

Entry expiration. By default the entries never expire.

spring.cache.redis.use-key-prefix

true

Whether to use the key prefix when writing to Redis.

spring.cache.type

Cache type. By default, auto-detected according to the environment.

3. Mail Properties

Key Default Value Description

spring.mail.default-encoding

UTF-8

Default MimeMessage encoding.

spring.mail.host

SMTP server host. For instance, `smtp.example.com`.

spring.mail.jndi-name

Session JNDI name. When set, takes precedence over other Session settings.

spring.mail.password

Login password of the SMTP server.

spring.mail.port

SMTP server port.

spring.mail.properties.*

Additional JavaMail Session properties.

spring.mail.protocol

smtp

Protocol used by the SMTP server.

spring.mail.test-connection

false

Whether to test that the mail server is available on startup.

spring.mail.username

Login user of the SMTP server.

spring.sendgrid.api-key

SendGrid API key.

spring.sendgrid.proxy.host

SendGrid proxy host.

spring.sendgrid.proxy.port

SendGrid proxy port.

4. JSON Properties

Key Default Value Description

spring.gson.date-format

Format to use when serializing Date objects.

spring.gson.disable-html-escaping

Whether to disable the escaping of HTML characters such as '<', '>', etc.

spring.gson.disable-inner-class-serialization

Whether to exclude inner classes during serialization.

spring.gson.enable-complex-map-key-serialization

Whether to enable serialization of complex map keys (i.e. non-primitives).

spring.gson.exclude-fields-without-expose-annotation

Whether to exclude all fields from consideration for serialization or deserialization that do not have the "Expose" annotation.

spring.gson.field-naming-policy

Naming policy that should be applied to an object's field during serialization and deserialization.

spring.gson.generate-non-executable-json

Whether to generate non executable JSON by prefixing the output with some special text.

spring.gson.lenient

Whether to be lenient about parsing JSON that doesn't conform to RFC 4627.

spring.gson.long-serialization-policy

Serialization policy for Long and long types.

spring.gson.pretty-printing

Whether to output serialized JSON that fits in a page for pretty printing.

spring.gson.serialize-nulls

Whether to serialize null fields.

spring.jackson.date-format

Date format string or a fully-qualified date format class name. For instance, `yyyy-MM-dd HH:mm:ss`.

spring.jackson.default-property-inclusion

Controls the inclusion of properties during serialization. Configured with one of the values in Jackson's JsonInclude.Include enumeration.

spring.jackson.deserialization.*

Jackson on/off features that affect the way Java objects are deserialized.

spring.jackson.generator.*

Jackson on/off features for generators.

spring.jackson.locale

Locale used for formatting.

spring.jackson.mapper.*

Jackson general purpose on/off features.

spring.jackson.parser.*

Jackson on/off features for parsers.

spring.jackson.property-naming-strategy

One of the constants on Jackson's PropertyNamingStrategy. Can also be a fully-qualified class name of a PropertyNamingStrategy subclass.

spring.jackson.serialization.*

Jackson on/off features that affect the way Java objects are serialized.

spring.jackson.time-zone

Time zone used when formatting dates. For instance, "America/Los_Angeles" or "GMT+10".

spring.jackson.visibility.*

Jackson visibility thresholds that can be used to limit which methods (and fields) are auto-detected.

5. Data Properties

Key Default Value Description

spring.couchbase.connection-string

Connection string used to locate the Couchbase cluster.

spring.couchbase.env.io.idle-http-connection-timeout

4500ms

Length of time an HTTP connection may remain idle before it is closed and removed from the pool.

spring.couchbase.env.io.max-endpoints

12

Maximum number of sockets per node.

spring.couchbase.env.io.min-endpoints

1

Minimum number of sockets per node.

spring.couchbase.env.ssl.enabled

Whether to enable SSL support. Enabled automatically if a "keyStore" is provided unless specified otherwise.

spring.couchbase.env.ssl.key-store

Path to the JVM key store that holds the certificates.

spring.couchbase.env.ssl.key-store-password

Password used to access the key store.

spring.couchbase.env.timeouts.analytics

75s

Timeout for the analytics service.

spring.couchbase.env.timeouts.connect

10s

Bucket connect timeout.

spring.couchbase.env.timeouts.disconnect

10s

Bucket disconnect timeout.

spring.couchbase.env.timeouts.key-value

2500ms

Timeout for operations on a specific key-value.

spring.couchbase.env.timeouts.key-value-durable

10s

Timeout for operations on a specific key-value with a durability level.

spring.couchbase.env.timeouts.management

75s

Timeout for the management operations.

spring.couchbase.env.timeouts.query

75s

N1QL query operations timeout.

spring.couchbase.env.timeouts.search

75s

Timeout for the search service.

spring.couchbase.env.timeouts.view

75s

Regular and geospatial view operations timeout.

spring.couchbase.password

Cluster password.

spring.couchbase.username

Cluster username.

spring.dao.exceptiontranslation.enabled

true

Whether to enable the PersistenceExceptionTranslationPostProcessor.

spring.data.cassandra.compression

none

Compression supported by the Cassandra binary protocol.

spring.data.cassandra.connection.connect-timeout

5s

Timeout to use when establishing driver connections.

spring.data.cassandra.connection.init-query-timeout

5s

Timeout to use for internal queries that run as part of the initialization process, just after a connection is opened.

spring.data.cassandra.contact-points

[127.0.0.1:9042]

Cluster node addresses in the form 'host:port', or a simple 'host' to use the configured port.

spring.data.cassandra.keyspace-name

Keyspace name to use.

spring.data.cassandra.local-datacenter

Datacenter that is considered "local". Contact points should be from this datacenter.

spring.data.cassandra.password

Login password of the server.

spring.data.cassandra.pool.heartbeat-interval

30s

Heartbeat interval after which a message is sent on an idle connection to make sure it's still alive.

spring.data.cassandra.pool.idle-timeout

5s

Idle timeout before an idle connection is removed.

spring.data.cassandra.port

9042

Port to use if a contact point does not specify one.

spring.data.cassandra.repositories.type

auto

Type of Cassandra repositories to enable.

spring.data.cassandra.request.consistency

Queries consistency level.

spring.data.cassandra.request.page-size

5000

How many rows will be retrieved simultaneously in a single network roundtrip.

spring.data.cassandra.request.serial-consistency

Queries serial consistency level.

spring.data.cassandra.request.throttler.drain-interval

10ms

How often the throttler attempts to dequeue requests. Set this high enough that each attempt will process multiple entries in the queue, but not delay requests too much.

spring.data.cassandra.request.throttler.max-concurrent-requests

10000

Maximum number of requests that are allowed to execute in parallel.

spring.data.cassandra.request.throttler.max-queue-size

10000

Maximum number of requests that can be enqueued when the throttling threshold is exceeded.

spring.data.cassandra.request.throttler.max-requests-per-second

10000

Maximum allowed request rate.

spring.data.cassandra.request.throttler.type

none

Request throttling type.

spring.data.cassandra.request.timeout

2s

How long the driver waits for a request to complete.

spring.data.cassandra.schema-action

none

Schema action to take at startup.

spring.data.cassandra.session-name

Name of the Cassandra session.

spring.data.cassandra.ssl

false

Enable SSL support.

spring.data.cassandra.username

Login user of the server.

spring.data.couchbase.auto-index

false

Automatically create views and indexes. Use the meta-data provided by "@ViewIndexed", "@N1qlPrimaryIndexed" and "@N1qlSecondaryIndexed".

spring.data.couchbase.bucket-name

Name of the bucket to connect to.

spring.data.couchbase.field-naming-strategy

Fully qualified name of the FieldNamingStrategy to use.

spring.data.couchbase.repositories.type

auto

Type of Couchbase repositories to enable.

spring.data.couchbase.scope-name

Name of the scope used for all collection access.

spring.data.couchbase.type-key

_class

Name of the field that stores the type information for complex types when using "MappingCouchbaseConverter".

spring.data.elasticsearch.client.reactive.connection-timeout

Connection timeout.

spring.data.elasticsearch.client.reactive.endpoints

Comma-separated list of the Elasticsearch endpoints to connect to.

spring.data.elasticsearch.client.reactive.max-in-memory-size

Limit on the number of bytes that can be buffered whenever the input stream needs to be aggregated.

spring.data.elasticsearch.client.reactive.password

Credentials password.

spring.data.elasticsearch.client.reactive.socket-timeout

Read and Write Socket timeout.

spring.data.elasticsearch.client.reactive.use-ssl

false

Whether the client should use SSL to connect to the endpoints.

spring.data.elasticsearch.client.reactive.username

Credentials username.

spring.data.elasticsearch.repositories.enabled

true

Whether to enable Elasticsearch repositories.

spring.data.jdbc.repositories.enabled

true

Whether to enable JDBC repositories.

spring.data.jpa.repositories.bootstrap-mode

default

Bootstrap mode for JPA repositories.

spring.data.jpa.repositories.enabled

true

Whether to enable JPA repositories.

spring.data.ldap.repositories.enabled

true

Whether to enable LDAP repositories.

spring.data.mongodb.authentication-database

Authentication database name.

spring.data.mongodb.auto-index-creation

Whether to enable auto-index creation.

spring.data.mongodb.database

Database name.

spring.data.mongodb.field-naming-strategy

Fully qualified name of the FieldNamingStrategy to use.

spring.data.mongodb.gridfs.bucket

GridFS bucket name.

spring.data.mongodb.gridfs.database

GridFS database name.

spring.data.mongodb.host

Mongo server host. Cannot be set with URI.

spring.data.mongodb.password

Login password of the mongo server. Cannot be set with URI.

spring.data.mongodb.port

Mongo server port. Cannot be set with URI.

spring.data.mongodb.replica-set-name

Required replica set name for the cluster. Cannot be set with URI.

spring.data.mongodb.repositories.type

auto

Type of Mongo repositories to enable.

spring.data.mongodb.uri

mongodb://localhost/test

Mongo database URI. Cannot be set with host, port, credentials and replica set name.

spring.data.mongodb.username

Login user of the mongo server. Cannot be set with URI.

spring.data.mongodb.uuid-representation

java-legacy

Representation to use when converting a UUID to a BSON binary value.

spring.data.neo4j.database

Database name to use. By default, the server decides the default database to use.

spring.data.neo4j.repositories.type

auto

Type of Neo4j repositories to enable.

spring.data.r2dbc.repositories.enabled

true

Whether to enable R2DBC repositories.

spring.data.redis.repositories.enabled

true

Whether to enable Redis repositories.

spring.data.rest.base-path

Base path to be used by Spring Data REST to expose repository resources.

spring.data.rest.default-media-type

Content type to use as a default when none is specified.

spring.data.rest.default-page-size

Default size of pages.

spring.data.rest.detection-strategy

default

Strategy to use to determine which repositories get exposed.

spring.data.rest.enable-enum-translation

Whether to enable enum value translation through the Spring Data REST default resource bundle.

spring.data.rest.limit-param-name

Name of the URL query string parameter that indicates how many results to return at once.

spring.data.rest.max-page-size

Maximum size of pages.

spring.data.rest.page-param-name

Name of the URL query string parameter that indicates what page to return.

spring.data.rest.return-body-on-create

Whether to return a response body after creating an entity.

spring.data.rest.return-body-on-update

Whether to return a response body after updating an entity.

spring.data.rest.sort-param-name

Name of the URL query string parameter that indicates what direction to sort results.

spring.data.solr.host

http://127.0.0.1:8983/solr

Solr host. Ignored if "zk-host" is set.

spring.data.solr.zk-host

ZooKeeper host address in the form HOST:PORT.

spring.data.web.pageable.default-page-size

20

Default page size.

spring.data.web.pageable.max-page-size

2000

Maximum page size to be accepted.

spring.data.web.pageable.one-indexed-parameters

false

Whether to expose and assume 1-based page number indexes. Defaults to "false", meaning a page number of 0 in the request equals the first page.

spring.data.web.pageable.page-parameter

page

Page index parameter name.

spring.data.web.pageable.prefix

General prefix to be prepended to the page number and page size parameters.

spring.data.web.pageable.qualifier-delimiter

_

Delimiter to be used between the qualifier and the actual page number and size properties.

spring.data.web.pageable.size-parameter

size

Page size parameter name.

spring.data.web.sort.sort-parameter

sort

Sort parameter name.

spring.datasource.continue-on-error

false

Whether to stop if an error occurs while initializing the database.

spring.datasource.data

Data (DML) script resource references.

spring.datasource.data-password

Password of the database to execute DML scripts (if different).

spring.datasource.data-username

Username of the database to execute DML scripts (if different).

spring.datasource.dbcp2.abandoned-usage-tracking
spring.datasource.dbcp2.access-to-underlying-connection-allowed
spring.datasource.dbcp2.auto-commit-on-return
spring.datasource.dbcp2.cache-state
spring.datasource.dbcp2.clear-statement-pool-on-return
spring.datasource.dbcp2.connection-factory-class-name
spring.datasource.dbcp2.connection-init-sqls
spring.datasource.dbcp2.default-auto-commit
spring.datasource.dbcp2.default-catalog
spring.datasource.dbcp2.default-query-timeout
spring.datasource.dbcp2.default-read-only
spring.datasource.dbcp2.default-schema
spring.datasource.dbcp2.default-transaction-isolation
spring.datasource.dbcp2.disconnection-sql-codes
spring.datasource.dbcp2.driver
spring.datasource.dbcp2.driver-class-name
spring.datasource.dbcp2.eviction-policy-class-name
spring.datasource.dbcp2.fast-fail-validation
spring.datasource.dbcp2.initial-size
spring.datasource.dbcp2.jmx-name
spring.datasource.dbcp2.lifo
spring.datasource.dbcp2.log-abandoned
spring.datasource.dbcp2.log-expired-connections
spring.datasource.dbcp2.login-timeout
spring.datasource.dbcp2.max-conn-lifetime-millis
spring.datasource.dbcp2.max-idle
spring.datasource.dbcp2.max-open-prepared-statements
spring.datasource.dbcp2.max-total
spring.datasource.dbcp2.max-wait-millis
spring.datasource.dbcp2.min-evictable-idle-time-millis
spring.datasource.dbcp2.min-idle
spring.datasource.dbcp2.num-tests-per-eviction-run
spring.datasource.dbcp2.password
spring.datasource.dbcp2.pool-prepared-statements
spring.datasource.dbcp2.remove-abandoned-on-borrow
spring.datasource.dbcp2.remove-abandoned-on-maintenance
spring.datasource.dbcp2.remove-abandoned-timeout
spring.datasource.dbcp2.rollback-on-return
spring.datasource.dbcp2.soft-min-evictable-idle-time-millis
spring.datasource.dbcp2.test-on-borrow
spring.datasource.dbcp2.test-on-create
spring.datasource.dbcp2.test-on-return
spring.datasource.dbcp2.test-while-idle
spring.datasource.dbcp2.time-between-eviction-runs-millis
spring.datasource.dbcp2.url
spring.datasource.dbcp2.username
spring.datasource.dbcp2.validation-query
spring.datasource.dbcp2.validation-query-timeout

Commons DBCP2 specific settings bound to an instance of DBCP2's BasicDataSource

spring.datasource.driver-class-name

Fully qualified name of the JDBC driver. Auto-detected based on the URL by default.

spring.datasource.generate-unique-name

true

Whether to generate a random datasource name.

spring.datasource.hikari.allow-pool-suspension
spring.datasource.hikari.auto-commit
spring.datasource.hikari.catalog
spring.datasource.hikari.connection-init-sql
spring.datasource.hikari.connection-test-query
spring.datasource.hikari.connection-timeout
spring.datasource.hikari.data-source-class-name
spring.datasource.hikari.data-source-j-n-d-i
spring.datasource.hikari.data-source-properties
spring.datasource.hikari.driver-class-name
spring.datasource.hikari.exception-override-class-name
spring.datasource.hikari.health-check-properties
spring.datasource.hikari.health-check-registry
spring.datasource.hikari.idle-timeout
spring.datasource.hikari.initialization-fail-timeout
spring.datasource.hikari.isolate-internal-queries
spring.datasource.hikari.jdbc-url
spring.datasource.hikari.leak-detection-threshold
spring.datasource.hikari.login-timeout
spring.datasource.hikari.max-lifetime
spring.datasource.hikari.maximum-pool-size
spring.datasource.hikari.metric-registry
spring.datasource.hikari.metrics-tracker-factory
spring.datasource.hikari.minimum-idle
spring.datasource.hikari.password
spring.datasource.hikari.pool-name
spring.datasource.hikari.read-only
spring.datasource.hikari.register-mbeans
spring.datasource.hikari.scheduled-executor
spring.datasource.hikari.schema
spring.datasource.hikari.transaction-isolation
spring.datasource.hikari.username
spring.datasource.hikari.validation-timeout

Hikari specific settings bound to an instance of Hikari's HikariDataSource

spring.datasource.initialization-mode

embedded

Mode to apply when determining if DataSource initialization should be performed using the available DDL and DML scripts.

spring.datasource.jndi-name

JNDI location of the datasource. Class, url, username and password are ignored when set.

spring.datasource.name

Name of the datasource. Default to "testdb" when using an embedded database.

spring.datasource.oracleucp.abandoned-connection-timeout
spring.datasource.oracleucp.connection-factory-class-name
spring.datasource.oracleucp.connection-factory-properties
spring.datasource.oracleucp.connection-harvest-max-count
spring.datasource.oracleucp.connection-harvest-trigger-count
spring.datasource.oracleucp.connection-labeling-high-cost
spring.datasource.oracleucp.connection-pool-name
spring.datasource.oracleucp.connection-properties
spring.datasource.oracleucp.connection-repurpose-threshold
spring.datasource.oracleucp.connection-validation-timeout
spring.datasource.oracleucp.connection-wait-timeout
spring.datasource.oracleucp.data-source-name
spring.datasource.oracleucp.database-name
spring.datasource.oracleucp.description
spring.datasource.oracleucp.fast-connection-failover-enabled
spring.datasource.oracleucp.high-cost-connection-reuse-threshold
spring.datasource.oracleucp.inactive-connection-timeout
spring.datasource.oracleucp.initial-pool-size
spring.datasource.oracleucp.login-timeout
spring.datasource.oracleucp.max-connection-reuse-count
spring.datasource.oracleucp.max-connection-reuse-time
spring.datasource.oracleucp.max-connections-per-shard
spring.datasource.oracleucp.max-idle-time
spring.datasource.oracleucp.max-pool-size
spring.datasource.oracleucp.max-statements
spring.datasource.oracleucp.min-pool-size
spring.datasource.oracleucp.network-protocol
spring.datasource.oracleucp.o-n-s-configuration
spring.datasource.oracleucp.password
spring.datasource.oracleucp.pdb-roles
spring.datasource.oracleucp.port-number
spring.datasource.oracleucp.property-cycle
spring.datasource.oracleucp.query-timeout
spring.datasource.oracleucp.role-name
spring.datasource.oracleucp.s-q-l-for-validate-connection
spring.datasource.oracleucp.seconds-to-trust-idle-connection
spring.datasource.oracleucp.server-name
spring.datasource.oracleucp.sharding-mode
spring.datasource.oracleucp.time-to-live-connection-timeout
spring.datasource.oracleucp.timeout-check-interval
spring.datasource.oracleucp.u-r-l
spring.datasource.oracleucp.user
spring.datasource.oracleucp.validate-connection-on-borrow

Oracle UCP specific settings bound to an instance of Oracle UCP's PoolDataSource

spring.datasource.password

Login password of the database.

spring.datasource.platform

all

Platform to use in the DDL or DML scripts (such as schema-${platform}.sql or data-${platform}.sql).

spring.datasource.schema

Schema (DDL) script resource references.

spring.datasource.schema-password

Password of the database to execute DDL scripts (if different).

spring.datasource.schema-username

Username of the database to execute DDL scripts (if different).

spring.datasource.separator

;

Statement separator in SQL initialization scripts.

spring.datasource.sql-script-encoding

SQL scripts encoding.

spring.datasource.tomcat.abandon-when-percentage-full
spring.datasource.tomcat.access-to-underlying-connection-allowed
spring.datasource.tomcat.alternate-username-allowed
spring.datasource.tomcat.commit-on-return
spring.datasource.tomcat.connection-properties
spring.datasource.tomcat.data-source
spring.datasource.tomcat.data-source-j-n-d-i
spring.datasource.tomcat.db-properties
spring.datasource.tomcat.default-auto-commit
spring.datasource.tomcat.default-catalog
spring.datasource.tomcat.default-read-only
spring.datasource.tomcat.default-transaction-isolation
spring.datasource.tomcat.driver-class-name
spring.datasource.tomcat.fair-queue
spring.datasource.tomcat.ignore-exception-on-pre-load
spring.datasource.tomcat.init-s-q-l
spring.datasource.tomcat.initial-size
spring.datasource.tomcat.jdbc-interceptors
spring.datasource.tomcat.jmx-enabled
spring.datasource.tomcat.log-abandoned
spring.datasource.tomcat.log-validation-errors
spring.datasource.tomcat.login-timeout
spring.datasource.tomcat.max-active
spring.datasource.tomcat.max-age
spring.datasource.tomcat.max-idle
spring.datasource.tomcat.max-wait
spring.datasource.tomcat.min-evictable-idle-time-millis
spring.datasource.tomcat.min-idle
spring.datasource.tomcat.name
spring.datasource.tomcat.num-tests-per-eviction-run
spring.datasource.tomcat.password
spring.datasource.tomcat.propagate-interrupt-state
spring.datasource.tomcat.remove-abandoned
spring.datasource.tomcat.remove-abandoned-timeout
spring.datasource.tomcat.rollback-on-return
spring.datasource.tomcat.suspect-timeout
spring.datasource.tomcat.test-on-borrow
spring.datasource.tomcat.test-on-connect
spring.datasource.tomcat.test-on-return
spring.datasource.tomcat.test-while-idle
spring.datasource.tomcat.time-between-eviction-runs-millis
spring.datasource.tomcat.url
spring.datasource.tomcat.use-disposable-connection-facade
spring.datasource.tomcat.use-equals
spring.datasource.tomcat.use-lock
spring.datasource.tomcat.use-statement-facade
spring.datasource.tomcat.username
spring.datasource.tomcat.validation-interval
spring.datasource.tomcat.validation-query
spring.datasource.tomcat.validation-query-timeout
spring.datasource.tomcat.validator-class-name

Tomcat datasource specific settings bound to an instance of Tomcat JDBC's DataSource

spring.datasource.type

Fully qualified name of the connection pool implementation to use. By default, it is auto-detected from the classpath.

spring.datasource.url

JDBC URL of the database.

spring.datasource.username

Login username of the database.

spring.datasource.xa.data-source-class-name

XA datasource fully qualified name.

spring.datasource.xa.properties.*

Properties to pass to the XA data source.

spring.elasticsearch.rest.connection-timeout

1s

Connection timeout.

spring.elasticsearch.rest.password

Credentials password.

spring.elasticsearch.rest.read-timeout

30s

Read timeout.

spring.elasticsearch.rest.uris

[http://localhost:9200]

Comma-separated list of the Elasticsearch instances to use.

spring.elasticsearch.rest.username

Credentials username.

spring.h2.console.enabled

false

Whether to enable the console.

spring.h2.console.path

/h2-console

Path at which the console is available.

spring.h2.console.settings.trace

false

Whether to enable trace output.

spring.h2.console.settings.web-admin-password

Password to access preferences and tools of H2 Console.

spring.h2.console.settings.web-allow-others

false

Whether to enable remote access.

spring.influx.password

Login password.

spring.influx.url

URL of the InfluxDB instance to which to connect.

spring.influx.user

Login user.

spring.jdbc.template.fetch-size

-1

Number of rows that should be fetched from the database when more rows are needed. Use -1 to use the JDBC driver's default configuration.

spring.jdbc.template.max-rows

-1

Maximum number of rows. Use -1 to use the JDBC driver's default configuration.

spring.jdbc.template.query-timeout

Query timeout. Default is to use the JDBC driver's default configuration. If a duration suffix is not specified, seconds will be used.

spring.jooq.sql-dialect

SQL dialect to use. Auto-detected by default.

spring.jpa.database

Target database to operate on, auto-detected by default. Can be alternatively set using the "databasePlatform" property.

spring.jpa.database-platform

Name of the target database to operate on, auto-detected by default. Can be alternatively set using the "Database" enum.

spring.jpa.generate-ddl

false

Whether to initialize the schema on startup.

spring.jpa.hibernate.ddl-auto

DDL mode. This is actually a shortcut for the "hibernate.hbm2ddl.auto" property. Defaults to "create-drop" when using an embedded database and no schema manager was detected. Otherwise, defaults to "none".

spring.jpa.hibernate.naming.implicit-strategy

Fully qualified name of the implicit naming strategy.

spring.jpa.hibernate.naming.physical-strategy

Fully qualified name of the physical naming strategy.

spring.jpa.hibernate.use-new-id-generator-mappings

Whether to use Hibernate's newer IdentifierGenerator for AUTO, TABLE and SEQUENCE. This is actually a shortcut for the "hibernate.id.new_generator_mappings" property. When not specified will default to "true".

spring.jpa.mapping-resources

Mapping resources (equivalent to "mapping-file" entries in persistence.xml).

spring.jpa.open-in-view

true

Register OpenEntityManagerInViewInterceptor. Binds a JPA EntityManager to the thread for the entire processing of the request.

spring.jpa.properties.*

Additional native properties to set on the JPA provider.

spring.jpa.show-sql

false

Whether to enable logging of SQL statements.

spring.ldap.anonymous-read-only

Whether read-only operations should use an anonymous environment. Disabled by default unless a username is set.

spring.ldap.base

Base suffix from which all operations should originate.

spring.ldap.base-environment.*

LDAP specification settings.

spring.ldap.embedded.base-dn

List of base DNs.

spring.ldap.embedded.credential.password

Embedded LDAP password.

spring.ldap.embedded.credential.username

Embedded LDAP username.

spring.ldap.embedded.ldif

classpath:schema.ldif

Schema (LDIF) script resource reference.

spring.ldap.embedded.port

0

Embedded LDAP port.

spring.ldap.embedded.validation.enabled

true

Whether to enable LDAP schema validation.

spring.ldap.embedded.validation.schema

Path to the custom schema.

spring.ldap.password

Login password of the server.

spring.ldap.template.ignore-name-not-found-exception

false

Whether NameNotFoundException should be ignored in searches via the LdapTemplate.

spring.ldap.template.ignore-partial-result-exception

false

Whether PartialResultException should be ignored in searches via the LdapTemplate.

spring.ldap.template.ignore-size-limit-exceeded-exception

true

Whether SizeLimitExceededException should be ignored in searches via the LdapTemplate.

spring.ldap.urls

LDAP URLs of the server.

spring.ldap.username

Login username of the server.

spring.mongodb.embedded.features

[sync_delay]

Comma-separated list of features to enable. Uses the defaults of the configured version by default.

spring.mongodb.embedded.storage.database-dir

Directory used for data storage.

spring.mongodb.embedded.storage.oplog-size

Maximum size of the oplog.

spring.mongodb.embedded.storage.repl-set-name

Name of the replica set.

spring.mongodb.embedded.version

3.5.5

Version of Mongo to use.

spring.neo4j.authentication.kerberos-ticket

Kerberos ticket for connecting to the database. Mutual exclusive with a given username.

spring.neo4j.authentication.password

Login password of the server.

spring.neo4j.authentication.realm

Realm to connect to.

spring.neo4j.authentication.username

Login user of the server.

spring.neo4j.connection-timeout

30s

Timeout for borrowing connections from the pool.

spring.neo4j.max-transaction-retry-time

30s

Maximum time transactions are allowed to retry.

spring.neo4j.pool.connection-acquisition-timeout

60s

Acquisition of new connections will be attempted for at most configured timeout.

spring.neo4j.pool.idle-time-before-connection-test

Pooled connections that have been idle in the pool for longer than this threshold will be tested before they are used again.

spring.neo4j.pool.log-leaked-sessions

false

Whether to log leaked sessions.

spring.neo4j.pool.max-connection-lifetime

1h

Pooled connections older than this threshold will be closed and removed from the pool.

spring.neo4j.pool.max-connection-pool-size

100

Maximum amount of connections in the connection pool towards a single database.

spring.neo4j.pool.metrics-enabled

false

Whether to enable metrics.

spring.neo4j.security.cert-file

Path to the file that holds the trusted certificates.

spring.neo4j.security.encrypted

false

Whether the driver should use encrypted traffic.

spring.neo4j.security.hostname-verification-enabled

true

Whether hostname verification is required.

spring.neo4j.security.trust-strategy

trust-system-ca-signed-certificates

Trust strategy to use.

spring.neo4j.uri

bolt://localhost:7687

URI used by the driver.

spring.r2dbc.generate-unique-name

false

Whether to generate a random database name. Ignore any configured name when enabled.

spring.r2dbc.name

Database name. Set if no name is specified in the url. Default to "testdb" when using an embedded database.

spring.r2dbc.password

Login password of the database. Set if no password is specified in the url.

spring.r2dbc.pool.enabled

Whether pooling is enabled. Enabled automatically if "r2dbc-pool" is on the classpath.

spring.r2dbc.pool.initial-size

10

Initial connection pool size.

spring.r2dbc.pool.max-acquire-time

Maximum time to acquire a connection from the pool. By default, wait indefinitely.

spring.r2dbc.pool.max-create-connection-time

Maximum time to wait to create a new connection. By default, wait indefinitely.

spring.r2dbc.pool.max-idle-time

30m

Maximum amount of time that a connection is allowed to sit idle in the pool.

spring.r2dbc.pool.max-life-time

Maximum lifetime of a connection in the pool. By default, connections have an infinite lifetime.

spring.r2dbc.pool.max-size

10

Maximal connection pool size.

spring.r2dbc.pool.validation-depth

local

Validation depth.

spring.r2dbc.pool.validation-query

Validation query.

spring.r2dbc.properties.*

Additional R2DBC options.

spring.r2dbc.url

R2DBC URL of the database. database name, username, password and pooling options specified in the url take precedence over individual options.

spring.r2dbc.username

Login username of the database. Set if no username is specified in the url.

spring.redis.client-name

Client name to be set on connections with CLIENT SETNAME.

spring.redis.client-type

Type of client to use. By default, auto-detected according to the classpath.

spring.redis.cluster.max-redirects

Maximum number of redirects to follow when executing commands across the cluster.

spring.redis.cluster.nodes

Comma-separated list of "host:port" pairs to bootstrap from. This represents an "initial" list of cluster nodes and is required to have at least one entry.

spring.redis.connect-timeout

Connection timeout.

spring.redis.database

0

Database index used by the connection factory.

spring.redis.host

localhost

Redis server host.

spring.redis.jedis.pool.max-active

8

Maximum number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.

spring.redis.jedis.pool.max-idle

8

Maximum number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.

spring.redis.jedis.pool.max-wait

-1ms

Maximum amount of time a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.

spring.redis.jedis.pool.min-idle

0

Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if both it and time between eviction runs are positive.

spring.redis.jedis.pool.time-between-eviction-runs

Time between runs of the idle object evictor thread. When positive, the idle object evictor thread starts, otherwise no idle object eviction is performed.

spring.redis.lettuce.cluster.refresh.adaptive

false

Whether adaptive topology refreshing using all available refresh triggers should be used.

spring.redis.lettuce.cluster.refresh.dynamic-refresh-sources

true

Whether to discover and query all cluster nodes for obtaining the cluster topology. When set to false, only the initial seed nodes are used as sources for topology discovery.

spring.redis.lettuce.cluster.refresh.period

Cluster topology refresh period.

spring.redis.lettuce.pool.max-active

8

Maximum number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.

spring.redis.lettuce.pool.max-idle

8

Maximum number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.

spring.redis.lettuce.pool.max-wait

-1ms

Maximum amount of time a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.

spring.redis.lettuce.pool.min-idle

0

Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if both it and time between eviction runs are positive.

spring.redis.lettuce.pool.time-between-eviction-runs

Time between runs of the idle object evictor thread. When positive, the idle object evictor thread starts, otherwise no idle object eviction is performed.

spring.redis.lettuce.shutdown-timeout

100ms

Shutdown timeout.

spring.redis.password

Login password of the redis server.

spring.redis.port

6379

Redis server port.

spring.redis.sentinel.master

Name of the Redis server.

spring.redis.sentinel.nodes

Comma-separated list of "host:port" pairs.

spring.redis.sentinel.password

Password for authenticating with sentinel(s).

spring.redis.ssl

false

Whether to enable SSL support.

spring.redis.timeout

Read timeout.

spring.redis.url

Connection URL. Overrides host, port, and password. User is ignored. Example: redis://user:[email protected] :6379

spring.redis.username

Login username of the redis server.

6. Transaction Properties

Key Default Value Description

spring.jta.atomikos.connectionfactory.borrow-connection-timeout

30

Timeout, in seconds, for borrowing connections from the pool.

spring.jta.atomikos.connectionfactory.ignore-session-transacted-flag

true

Whether to ignore the transacted flag when creating session.

spring.jta.atomikos.connectionfactory.local-transaction-mode

false

Whether local transactions are desired.

spring.jta.atomikos.connectionfactory.maintenance-interval

60

Time, in seconds, between runs of the pool's maintenance thread.

spring.jta.atomikos.connectionfactory.max-idle-time

60

Time, in seconds, after which connections are cleaned up from the pool.

spring.jta.atomikos.connectionfactory.max-lifetime

0

Time, in seconds, that a connection can be pooled for before being destroyed. 0 denotes no limit.

spring.jta.atomikos.connectionfactory.max-pool-size

1

Maximum size of the pool.

spring.jta.atomikos.connectionfactory.min-pool-size

1

Minimum size of the pool.

spring.jta.atomikos.connectionfactory.reap-timeout

0

Reap timeout, in seconds, for borrowed connections. 0 denotes no limit.

spring.jta.atomikos.connectionfactory.unique-resource-name

jmsConnectionFactory

Unique name used to identify the resource during recovery.

spring.jta.atomikos.connectionfactory.xa-connection-factory-class-name

Vendor-specific implementation of XAConnectionFactory.

spring.jta.atomikos.connectionfactory.xa-properties

Vendor-specific XA properties.

spring.jta.atomikos.datasource.borrow-connection-timeout

30

Timeout, in seconds, for borrowing connections from the pool.

spring.jta.atomikos.datasource.concurrent-connection-validation

true

Whether to use concurrent connection validation.

spring.jta.atomikos.datasource.default-isolation-level

Default isolation level of connections provided by the pool.

spring.jta.atomikos.datasource.login-timeout

0

Timeout, in seconds, for establishing a database connection.

spring.jta.atomikos.datasource.maintenance-interval

60

Time, in seconds, between runs of the pool's maintenance thread.

spring.jta.atomikos.datasource.max-idle-time

60

Time, in seconds, after which connections are cleaned up from the pool.

spring.jta.atomikos.datasource.max-lifetime

0

Time, in seconds, that a connection can be pooled for before being destroyed. 0 denotes no limit.

spring.jta.atomikos.datasource.max-pool-size

1

Maximum size of the pool.

spring.jta.atomikos.datasource.min-pool-size

1

Minimum size of the pool.

spring.jta.atomikos.datasource.reap-timeout

0

Reap timeout, in seconds, for borrowed connections. 0 denotes no limit.

spring.jta.atomikos.datasource.test-query

SQL query or statement used to validate a connection before returning it.

spring.jta.atomikos.datasource.unique-resource-name

dataSource

Unique name used to identify the resource during recovery.

spring.jta.atomikos.datasource.xa-data-source-class-name

Vendor-specific implementation of XAConnectionFactory.

spring.jta.atomikos.datasource.xa-properties

Vendor-specific XA properties.

spring.jta.atomikos.properties.allow-sub-transactions

true

Specify whether sub-transactions are allowed.

spring.jta.atomikos.properties.checkpoint-interval

500

Interval between checkpoint