Whether these properties take effect depends on whether the corresponding component is declared as a bean in the Spring application context (basically automatically configured), it is useless to set properties for a component that does not take effect.
multipart
multipart.enabled
Enable upload support (default: true)
multipart.file-size-threshold
: files larger than this value will be written to disk
multipart.location
Upload file storage location
multipart.max-file-size
maximum file size
multipart.max-request-size
maximum request size
server
server.address
server address
server.port
server port
server.context-parameters.[param name]
Set servlet context parameters
server.context-path
application context path
Jsp-servelt
server.jsp-servelt.class-name
Servlet class name used for jsp (default: org.apache.jasper.servlet.JspServlet)
server.jsp-servlet.registered
Whether JspServelt should be registered in the embedded servlet container (default true)
server.jsp-servlet.init-parameters[param name]
Set Jsp Servlet initialization parameters
server.servlet-path
Path to the main dispatcher servlet (default: /)
Session
server.session.cookie.domain
The domain of the callback cookie
server.session.cookie.comment
Cookie Notes
server.session.cookie.max-age
Cookie maximum storage time (unit s)
server.session.cookie.name
cookie name
server.session.cookie.timeout
overtime time
tomcat
server.tomcat.accesslog.directory
Directory where log files are created
server.tomcat.accesslog.enabled
Whether to enable access log (default: false)
server.tomcat.accesslog.pattern
Format of access logs (default: common)
server.tomcat.accesslog.prefix
log name prefix (default: access_log)
server.tomcat.accesslog.suffix
log name suffix (default: .log)
server.tomcat.max-http-header-size
Http message header maximum number of bytes (default: 0)
server.tomcat.uri-encoding
The character encoding used to decode the URI
Cache
spring.cache.cache-names
A comma-separated list of cache names to create can be specified here, if the underlying cache manager supports cache names. Typically this disables the runtime's ability to create other additional caches.
spring.cache.config
Configuration file location used to initialize EhCache
spring.cache.guava.spec
Used to create cache Spec
spring.cache.hazelcast.config
Configuration file location to initialize Hazeleast
spring.cache.infinispan.config
Used to initialize the Infinispan configuration file location
spring.cache.jcache.config
The location of the configuration file used to initialize the cache manager, the configuration file depends on the underlying cache implementation
spring.cache.jcache.provider CachingProvider
The fully qualified class name of the implementation used to get a JSR-107 compliant cache manager, this attribute is only required if there is more than one JSR-107 implementation in the classpath.
spring.cache.type
Cache type, the default is automatically detected according to the environment
Data
spring.data.jpa.repositories.enabled
Enable JPA repository (default: true)
spring.data.mongodb.authentication-database
Authentication database name
spring.data.mongodb.database
data storage name
spring.data.mongodb.field-naming-strategy
The fully qualified name of the FieldNamingStrategy to use.
spring.data.mongodb.grid.fs.database
GridFS database name
spring.data.mongodb.host
MongoDB server address
spring.data.mongodb.username
MongoDB account
spring.data.mongodb.password
MongoDB password
spring.data.mongodb.port
The port number
spring.data.mongodb.repositories.enabled
Enable Mongo repository (default: true)
spring.data.mongodb.uri
Mongo database URI. When this property is set, the host and port numbers are ignored. (default: mongodb://localhost/test)
spring.data.rest.base-path
Base path for publishing repository resources
spring.data.rest.default-page-size
Default page size for paginated data (default: 20)
spring.data.rest.limit-param-name
URL query string parameter name used to identify how many records to return at one time. (default: size )
spring.data.rest.max-page-sieze
: maximum page size (default: 1000)
spring.data.rest.page-param-name
The name of the URL query string parameter that identifies which page to return. (default: page )
spring.data.rest.return-body-on-create
Whether to return a response body after the entity is created (default: false)
spring.data.rest.return-body-on-update
Whether to return a response body after updating the entity (default: false)
spring.data.rest.sort-param-name
The name of the URL query string parameter to indicate the direction in which the results are sorted (default: name)
spring.data.solr.host
Solr's host address. This property is ignored if zk-host is set. (default: http://127.0.0.1:8983/solr )
spring.data.solr.repositories.enabled
Enable solr repository (default: true)
spring.data.solr.zk-host
zk host address in the format "host-port"
spring.datasource.allow-pool-suspension
Whether to allow pool suspension. There will be a performance hit after enabling pool suspend, unless you really need this feature (for example on redundant systems), don't enable it. This property is only useful when using the Hikari database connection pool. (Default: false .)
DataSource
spring.datasource.name
The name of the data source.
spring.datasource.username
The login username for the database.
spring.datasource.password
The login password for the database.
spring.datasource.url
The JDBC URL of the database.
spring.datasource.jdbc-url
The JDBC URL used to create the connection.
spring.datasource.driver-class-name
The fully qualified class name of the JDBC driver. By default it is automatically detected based on the URL.
spring.datasource.pool-name
Connection pool name.
spring.datasource.max-active
The maximum number of active connections in the connection pool.
spring.datasource.connection-timeout
Connection timeout (in milliseconds)
spring.datasource.max-age
Maximum lifetime of connections in the connection pool.
spring.datasource.max-idle
The maximum number of idle connections in the connection pool.
spring.datasource.max-lifetime
The maximum lifetime (in milliseconds) of connections in the connection pool.
spring.datasource.max-open-prepared-statements
The maximum number of PreparedStatements in the open state.
spring.datasource.max-wait
The maximum number of milliseconds the connection pool waits for a connection to return before throwing an exception.
spring.datasource.maximum-pool-size
The maximum size that the connection pool can achieve, including the number of idle connections and the number of connections in use.
spring.datasource.min-evictable-idle-time-millis
The minimum amount of time an idle connection will remain in the connection pool before it is gracefully released by the idle connection releaser (if any).
spring.datasource.min-idle
The minimum number of connections that should always be kept in the connection pool. (For DBCP and Tomcat connection pooling.)
spring.datasource.minimum-idle
: The minimum number of idle connections HikariCP tries to maintain in the connection pool.
spring.datasource.alternate-username-allowed
whether to allow other usernames
spring.datasource.auto-commit
Whether the update operation is automatically submitted
spring.datasource.abandon-when-percentage-full
A threshold for the percentage of the situation above which the connection is closed and deprecated
spring.datasource.catalog
Default Catalog name
spring.datasource.commit-on-return
Whether the connection pool should commit pending transactions when the connection is returned
spring.datasource.connection-init-sql
An SQL statement that is executed when all new connections are created, before the connection is added to the connection pool.
spring.datasource.connection-init-sqls
A list of SQL statements to execute when the physical connection is first created. (For DBCP connection pooling.)
spring.datasource.connection-properties.[key]
Set the properties used when creating the connection. (For DBCP connection pooling.)
spring.datasource.continue-on-error
Do not terminate with an error initializing the database. (default: false)
spring.datasource.data
A reference to a data (Data Manipulation Language, DML) scripting resource.
spring.datasource.data-source-class-name
The fully qualified class name of the data source used to get the connection.
spring.datasource.data-source-jndi
The JNDI location of the data source used to get the connection.
spring.datasource.data-source-properties.[key]
Set the properties used when creating the data source. (For Hikari connection pooling.)
spring.datasource.db-properties
Set the properties used when creating the data source. (For Tomcat connection pooling.)
spring.datasource.default-auto-commit
Whether the operation on the connection is automatically committed.
spring.datasource.default-catalog
The default Catalog for the connection.
spring.datasource.default-read-only
The default read-only state of the connection.
spring.datasource.default-transaction-isolation
The default transaction isolation level for connections.
spring.datasource.fair-queue
Whether to return connections in FIFO mode.
spring.datasource.health-check-properties.[key]
Set the properties to be included in the health check. (For Hikari connection pooling.)
spring.datasource.idle-timeout
The maximum time, in milliseconds, that a connection in the connection pool can remain idle. (Default: 10 .)
spring.datasource.ignore-exception-on-pre-load
Whether to ignore connections when initializing the database connection pool.
spring.datasource.init-sql
A custom query to run when the connection is first created.
spring.datasource.initial-size
The number of connections to establish when the connection pool starts.
spring.datasource.initialization-fail-fast
Whether to throw an exception if the minimum number of connections is not reached when the connection pool is created. (Default: true .)
spring.datasource.initialize
Use data.sql to initialize the database. (Default: true .)
spring.datasource.isolate-internal-queries
Whether to isolate internal requests. (Default: false .)
spring.datasource.jdbc-interceptors
A semicolon-separated list of class names that extend the JdbcInterceptor class. These interceptors are inserted into the operation chain of the java.sql.Connection object. (For Tomcat connection pooling.)
spring.datasource.jmx-enabled
Turn on JMX support (if the underlying connection pool provides it). (Default: false .)
spring.datasource.jndi-name
The JNDI location of the data source. When this property is set, the class, URL, username and password properties are ignored.
spring.datasource.leak-detection-threshold
The threshold used to detect Hikari connection pool connection leaks, in milliseconds.
spring.datasource.log-abandoned
Whether to record stack traces for deprecated statements or connected application code. Used for DBCP connection pooling. (Default: false .)
spring.datasource.log-validation-errors
Whether to log validation errors when using the Tomcat connection pool.
spring.datasource.login-timeout
The timeout for connecting to the database (in seconds).
spring.datasource.num-tests-per-eviction-run
The number of objects to check for each run of the free object releaser thread (if any).
spring.datasource.platform
The platform to use in the Schema resource (schema-${platform}.sql). (Default: all .)
spring.datasource.pool-prepared-statements
Whether to put the Statement in the pool.
spring.datasource.propagate-interrupt-state
Whether to propagate the interrupt status for interrupted threads waiting for connections.
spring.datasource.read-only
Set the datasource to read-only when using Hikari connection pooling.
spring.datasource.register-mbeans
Whether the Hikari connection pool should register JMX MBeans.
spring.datasource.remove-abandoned
Whether the deprecated connection should be removed after the deprecation timeout is reached.
spring.datasource.remove-abandoned-timeout
After how many seconds a connection should be considered for deprecation.
spring.datasource.rollback-on-return
Whether to roll back the pending transaction when the connection is returned to the connection pool.
spring.datasource.schema
A reference to a Schema (Data Definition Language, DDL) scripting resource.
spring.datasource.separator
Statement separator in SQL initialization scripts. (Defaults: ; .)
spring.datasource.sql-script-encoding
The encoding of the SQL script.
spring.datasource.suspect-timeout
How many seconds to wait before logging a suspected deprecated connection.
spring.datasource.test-on-borrow
Whether to test when borrowing a connection from the connection pool.
spring.datasource.test-on-connect
Whether to test when establishing a connection.
spring.datasource.test-on-return
Whether to test when returning the connection to the connection pool.
spring.datasource.test-while-idle
Whether to test when the connection is idle.
spring.datasource.time-between-eviction-runs-millis
The number of milliseconds to sleep between idle connection verification, deprecated connection cleanup, and free pool resizing.
spring.datasource.transaction-isolation
Set the default transaction isolation level when using Hikari connection pooling.
spring.datasource.use-disposable-connection-facade
Whether the connection should be encapsulated with a facade, which cannot be used after calling Connection.close().
spring.datasource.use-equals
Whether to use String.equals() instead of == when comparing method names.
spring.datasource.use-lock
Whether to lock when operating the connection object.
spring.datasource.validation-interval
The interval between performing connection verification, in milliseconds.
spring.datasource.validation-query
The validation SQL query to execute when a connection in the connection pool is returned to the caller or the connection pool.
spring.datasource.validation-query-timeout
The timeout, in seconds, to wait before failing a connection verification query.
spring.datasource.validation-timeout
The timeout, in seconds, to wait before connection verification fails. (For Hikari connection pooling.)
spring.datasource.validator-class-name
The fully qualified class name of the optional validator class used to execute the test query.
spring.datasource.xa.data-source-class-name
The fully qualified class name of the XA data source.
spring.datasource.xa.properties
Properties to pass to the XA data source.
FreeMarker
spring.freemarker.allow-request-override
Whether attributes of HttpServletRequest are allowed to override (hide) controller-generated model attributes of the same name.
spring.freemarker.allow-session-override
Whether attributes of HttpSession are allowed to override (hide) controller-generated model attributes of the same name.
spring.freemarker.cache
Enable template caching.
spring.freemarker.charset
Template encoding.
spring.freemarker.check-template-location
Check if the template location exists.
spring.freemarker.content-type
The value of Content-Type.
spring.freemarker.enabled
Enable FreeMarker's MVC view parsing.
spring.freemarker.expose-request-attributes
Whether to add all request attributes to the model before merging it into the template.
spring.freemarker.expose-session-attributes
Whether to add all HttpSession properties to the model before merging it into the template.
spring.freemarker.expose-spring-macro-helpers
Whether to publish a RequestContext for use by the Spring macro library and name it springMacro-RequestContext
spring.freemarker.prefer-file-system-access
Access via the file system is preferred when loading templates. File system access detects template changes in real time. (Default: true .)
spring.freemarker.prefix
Prefix to add to the view name when building the URL.
spring.freemarker.request-context-attribute
The name of the RequestContext property used in all views.
spring.freemarker.settings
Various keys to pass to the FreeMarker configuration.
spring.freemarker.suffix
Suffix added to the view name when building the URL.
spring.freemarker.template-loader-path
A comma-separated list of template paths. (Default: ["classpath:/templates/"] .)
spring.freemarker.view-names
A whitelist of resolvable view names.
Groovy
spring.groovy.template.allow-request-override
Whether attributes of HttpServletRequest are allowed to override (hide) controller-generated model attributes of the same name.
spring.groovy.template.allow-session-override
Whether attributes of HttpSession are allowed to override (hide) controller-generated model attributes of the same name.
spring.groovy.template.cache
Enable template caching.
spring.groovy.template.charset
Template encoding.
spring.groovy.template.check-template-location
Check if the template location exists.
spring.groovy.template.configuration.auto-escape
Whether to escape model variables when they are rendered in templates. (Default: false .)
spring.groovy.template.configuration.auto-indent
Whether the template should automatically render indents. (Default: false .)
spring.groovy.template.configuration.auto-indent-string
The string used for indentation when automatic indentation is turned on, which can be SPACES or TAB. (Default: SPACES .)
spring.groovy.template.configuration.auto-new-line
Whether to render new blank lines in the template. (Default: false .)
spring.groovy.template.configuration.base-template-class
Template base class.
spring.groovy.template.configuration.cache-templates
Whether the template should be cached. (Default: true .)
spring.groovy.template.configuration.declaration-encoding
The encoding used to write the declaration header.
spring.groovy.template.configuration.expand-empty-elements
Elements without text should be written in short form (eg, ) or expanded form (eg, ). (default: false)
spring.groovy.template.configuration.locale
Set the template region.
spring.groovy.template.configuration.new-line-string
The string used to render blank lines when automatic blank lines are turned on. (Defaults to the system's line.separator property value.)
spring.groovy.template.configuration.resource-loader-path
Path to the Groovy template. (Default: classpath:/templates/ .)
spring.groovy.template.configuration.use-double-quotes
Whether the attribute should be in double or single quotes. (Default: false .)
spring.groovy.template.content-type
The value of Content-Type.
spring.groovy.template.enabled
Enables MVC view parsing for Groovy templates.
spring.groovy.template.expose-request-attributes
Whether to add all request attributes to the model before merging it into the template.
spring.groovy.template.expose-session-attributes
Whether to add all HttpSession properties to the model before merging it into the template.
spring.groovy.template.expose-spring-macro-helpers
Whether to publish a RequestContext for use by the Spring macro library and name it springMacro-RequestContext
spring.groovy.template.prefix
Prefix to add to the view name when building the URL.
spring.groovy.template.request-context-attribute
The name of the RequestContext property used in all views.
spring.groovy.template.resource-loader-path
Template path (Default: classpath:/templates/ .)
spring.groovy.template.suffix
Suffix added to the view name when building the URL.
spring.groovy.template.view-names
A whitelist of resolvable view names.
H2
spring.h2.console.enabled
Turn on the console. (Default: false .)
spring.h2.console.path
The path where the console can be found. (Default: /h2-console .)
Hornetq
spring.hornetq.embedded.cluster-password
Cluster password. Generated randomly at startup by default.
spring.hornetq.embedded.data-directory
log file directory. This property is not required if persistence is turned off.
spring.hornetq.embedded.enabled
If HornetQ server API is available, enable embedded mode. (Default: true .)
spring.hornetq.embedded.persistent
Enable persistent storage. (Default: false .)
spring.hornetq.embedded.queues
Comma-separated list of queues to create on startup. (Defaults: [] .)
spring.hornetq.embedded.server-id
Server ID. By default an auto-incrementing counter is used. (Default: 0 .)
spring.hornetq.embedded.topics
A comma-separated list of topics to create on startup. (Defaults: [] .)
spring.hornetq.host
HornetQ's host. (Default: localhost .)
spring.hornetq.mode
The deployment mode of HornetQ, the default is automatic detection. Can be explicitly set to native or embedded.
spring.hornetq.port
Port of HornetQ. (Default: 5445 .)
Http
spring.http.converters.preferred-json-mapper
JSON mapper is preferred for HTTP message conversion.
spring.http.encoding.charset
Character set for HTTP requests and responses. If no Content-Type header is explicitly specified, the attribute value is used as the value of this header. (Default: UTF-8 .)
spring.http.encoding.enabled
Enable HTTP encoding support. (Default: true .)
spring.http.encoding.force
Forces HTTP requests and responses to be encoded to the configured charset. (Default: true .)
Jackson
spring.jackson.date-format
Date format string (yyyy-MM-dd HH