Detailed configuration instructions for SpringBoot application.properties.


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.enabledEnable upload support (default: true)

multipart.file-size-threshold: files larger than this value will be written to disk

multipart.locationUpload file storage location

multipart.max-file-sizemaximum file size

multipart.max-request-sizemaximum request size

server

server.addressserver address

server.portserver port

server.context-parameters.[param name]Set servlet context parameters

server.context-pathapplication context path

Jsp-servelt

server.jsp-servelt.class-nameServlet class name used for jsp (default: org.apache.jasper.servlet.JspServlet)

server.jsp-servlet.registeredWhether 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-pathPath to the main dispatcher servlet (default: /)

Session

server.session.cookie.domainThe domain of the callback cookie

server.session.cookie.commentCookie Notes

server.session.cookie.max-ageCookie maximum storage time (unit s)

server.session.cookie.namecookie name

server.session.cookie.timeoutovertime time

tomcat

server.tomcat.accesslog.directoryDirectory where log files are created

server.tomcat.accesslog.enabledWhether to enable access log (default: false)

server.tomcat.accesslog.patternFormat of access logs (default: common)

server.tomcat.accesslog.prefixlog name prefix (default: access_log)

server.tomcat.accesslog.suffixlog name suffix (default: .log)

server.tomcat.max-http-header-sizeHttp message header maximum number of bytes (default: 0)

server.tomcat.uri-encodingThe character encoding used to decode the URI

Cache

spring.cache.cache-namesA 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.configConfiguration file location used to initialize EhCache

spring.cache.guava.specUsed to create cache Spec

spring.cache.hazelcast.configConfiguration file location to initialize Hazeleast

spring.cache.infinispan.configUsed to initialize the Infinispan configuration file location

spring.cache.jcache.configThe location of the configuration file used to initialize the cache manager, the configuration file depends on the underlying cache implementation

spring.cache.jcache.provider CachingProviderThe 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.typeCache type, the default is automatically detected according to the environment

Data

spring.data.jpa.repositories.enabledEnable JPA repository (default: true)

spring.data.mongodb.authentication-databaseAuthentication database name

spring.data.mongodb.databasedata storage name

spring.data.mongodb.field-naming-strategyThe fully qualified name of the FieldNamingStrategy to use.

spring.data.mongodb.grid.fs.databaseGridFS database name

spring.data.mongodb.hostMongoDB server address

spring.data.mongodb.usernameMongoDB account

spring.data.mongodb.passwordMongoDB password

spring.data.mongodb.portThe port number

spring.data.mongodb.repositories.enabledEnable Mongo repository (default: true)

spring.data.mongodb.uriMongo database URI. When this property is set, the host and port numbers are ignored. (default: mongodb://localhost/test)

spring.data.rest.base-pathBase path for publishing repository resources

spring.data.rest.default-page-sizeDefault page size for paginated data (default: 20)

spring.data.rest.limit-param-nameURL 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-nameThe name of the URL query string parameter that identifies which page to return. (default: page )

spring.data.rest.return-body-on-createWhether to return a response body after the entity is created (default: false)

spring.data.rest.return-body-on-updateWhether to return a response body after updating the entity (default: false)

spring.data.rest.sort-param-nameThe name of the URL query string parameter to indicate the direction in which the results are sorted (default: name)

spring.data.solr.hostSolr's host address. This property is ignored if zk-host is set. (default: http://127.0.0.1:8983/solr )

spring.data.solr.repositories.enabledEnable solr repository (default: true)

spring.data.solr.zk-hostzk host address in the format "host-port"

spring.datasource.allow-pool-suspensionWhether 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.nameThe name of the data source.

spring.datasource.usernameThe login username for the database.

spring.datasource.passwordThe login password for the database.

spring.datasource.urlThe JDBC URL of the database.

spring.datasource.jdbc-urlThe JDBC URL used to create the connection.

spring.datasource.driver-class-nameThe fully qualified class name of the JDBC driver. By default it is automatically detected based on the URL.

spring.datasource.pool-nameConnection pool name.

spring.datasource.max-activeThe maximum number of active connections in the connection pool.

spring.datasource.connection-timeoutConnection timeout (in milliseconds)

spring.datasource.max-ageMaximum lifetime of connections in the connection pool.

spring.datasource.max-idleThe maximum number of idle connections in the connection pool.

spring.datasource.max-lifetimeThe maximum lifetime (in milliseconds) of connections in the connection pool.

spring.datasource.max-open-prepared-statementsThe maximum number of PreparedStatements in the open state.

spring.datasource.max-waitThe maximum number of milliseconds the connection pool waits for a connection to return before throwing an exception.

spring.datasource.maximum-pool-sizeThe 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-millisThe 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-idleThe 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-allowedwhether to allow other usernames

spring.datasource.auto-commitWhether the update operation is automatically submitted

spring.datasource.abandon-when-percentage-fullA threshold for the percentage of the situation above which the connection is closed and deprecated

spring.datasource.catalogDefault Catalog name

spring.datasource.commit-on-returnWhether the connection pool should commit pending transactions when the connection is returned

spring.datasource.connection-init-sqlAn SQL statement that is executed when all new connections are created, before the connection is added to the connection pool.

spring.datasource.connection-init-sqlsA 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-errorDo not terminate with an error initializing the database. (default: false)

spring.datasource.dataA reference to a data (Data Manipulation Language, DML) scripting resource.

spring.datasource.data-source-class-nameThe fully qualified class name of the data source used to get the connection.

spring.datasource.data-source-jndiThe 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-propertiesSet the properties used when creating the data source. (For Tomcat connection pooling.)

spring.datasource.default-auto-commitWhether the operation on the connection is automatically committed.

spring.datasource.default-catalogThe default Catalog for the connection.

spring.datasource.default-read-onlyThe default read-only state of the connection.

spring.datasource.default-transaction-isolationThe default transaction isolation level for connections.

spring.datasource.fair-queueWhether 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-timeoutThe maximum time, in milliseconds, that a connection in the connection pool can remain idle. (Default: 10 .)

spring.datasource.ignore-exception-on-pre-loadWhether to ignore connections when initializing the database connection pool.

spring.datasource.init-sqlA custom query to run when the connection is first created.

spring.datasource.initial-sizeThe number of connections to establish when the connection pool starts.

spring.datasource.initialization-fail-fastWhether to throw an exception if the minimum number of connections is not reached when the connection pool is created. (Default: true .)

spring.datasource.initializeUse data.sql to initialize the database. (Default: true .)

spring.datasource.isolate-internal-queriesWhether to isolate internal requests. (Default: false .)

spring.datasource.jdbc-interceptorsA 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-enabledTurn on JMX support (if the underlying connection pool provides it). (Default: false .)

spring.datasource.jndi-nameThe JNDI location of the data source. When this property is set, the class, URL, username and password properties are ignored.

spring.datasource.leak-detection-thresholdThe threshold used to detect Hikari connection pool connection leaks, in milliseconds.

spring.datasource.log-abandonedWhether to record stack traces for deprecated statements or connected application code. Used for DBCP connection pooling. (Default: false .)

spring.datasource.log-validation-errorsWhether to log validation errors when using the Tomcat connection pool.

spring.datasource.login-timeoutThe timeout for connecting to the database (in seconds).

spring.datasource.num-tests-per-eviction-runThe number of objects to check for each run of the free object releaser thread (if any).

spring.datasource.platformThe platform to use in the Schema resource (schema-${platform}.sql). (Default: all .)

spring.datasource.pool-prepared-statementsWhether to put the Statement in the pool.

spring.datasource.propagate-interrupt-stateWhether to propagate the interrupt status for interrupted threads waiting for connections.

spring.datasource.read-onlySet the datasource to read-only when using Hikari connection pooling.

spring.datasource.register-mbeansWhether the Hikari connection pool should register JMX MBeans.

spring.datasource.remove-abandonedWhether the deprecated connection should be removed after the deprecation timeout is reached.

spring.datasource.remove-abandoned-timeoutAfter how many seconds a connection should be considered for deprecation.

spring.datasource.rollback-on-returnWhether to roll back the pending transaction when the connection is returned to the connection pool.

spring.datasource.schemaA reference to a Schema (Data Definition Language, DDL) scripting resource.

spring.datasource.separatorStatement separator in SQL initialization scripts. (Defaults: ; .)

spring.datasource.sql-script-encodingThe encoding of the SQL script.

spring.datasource.suspect-timeoutHow many seconds to wait before logging a suspected deprecated connection.

spring.datasource.test-on-borrowWhether to test when borrowing a connection from the connection pool.

spring.datasource.test-on-connectWhether to test when establishing a connection.

spring.datasource.test-on-returnWhether to test when returning the connection to the connection pool.

spring.datasource.test-while-idleWhether to test when the connection is idle.

spring.datasource.time-between-eviction-runs-millisThe number of milliseconds to sleep between idle connection verification, deprecated connection cleanup, and free pool resizing.

spring.datasource.transaction-isolationSet the default transaction isolation level when using Hikari connection pooling.

spring.datasource.use-disposable-connection-facadeWhether the connection should be encapsulated with a facade, which cannot be used after calling Connection.close().

spring.datasource.use-equalsWhether to use String.equals() instead of == when comparing method names.

spring.datasource.use-lockWhether to lock when operating the connection object.

spring.datasource.validation-intervalThe interval between performing connection verification, in milliseconds.

spring.datasource.validation-queryThe 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-timeoutThe timeout, in seconds, to wait before failing a connection verification query.

spring.datasource.validation-timeoutThe timeout, in seconds, to wait before connection verification fails. (For Hikari connection pooling.)

spring.datasource.validator-class-nameThe fully qualified class name of the optional validator class used to execute the test query.

spring.datasource.xa.data-source-class-nameThe fully qualified class name of the XA data source.

spring.datasource.xa.propertiesProperties to pass to the XA data source.

FreeMarker

spring.freemarker.allow-request-overrideWhether attributes of HttpServletRequest are allowed to override (hide) controller-generated model attributes of the same name.

spring.freemarker.allow-session-overrideWhether attributes of HttpSession are allowed to override (hide) controller-generated model attributes of the same name.

spring.freemarker.cacheEnable template caching.

spring.freemarker.charsetTemplate encoding.

spring.freemarker.check-template-locationCheck if the template location exists.

spring.freemarker.content-typeThe value of Content-Type.

spring.freemarker.enabledEnable FreeMarker's MVC view parsing.

spring.freemarker.expose-request-attributesWhether to add all request attributes to the model before merging it into the template.

spring.freemarker.expose-session-attributesWhether to add all HttpSession properties to the model before merging it into the template.

spring.freemarker.expose-spring-macro-helpersWhether to publish a RequestContext for use by the Spring macro library and name it springMacro-RequestContext

spring.freemarker.prefer-file-system-accessAccess via the file system is preferred when loading templates. File system access detects template changes in real time. (Default: true .)

spring.freemarker.prefixPrefix to add to the view name when building the URL.

spring.freemarker.request-context-attributeThe name of the RequestContext property used in all views.

spring.freemarker.settingsVarious keys to pass to the FreeMarker configuration.

spring.freemarker.suffixSuffix added to the view name when building the URL.

spring.freemarker.template-loader-pathA comma-separated list of template paths. (Default: ["classpath:/templates/"] .)

spring.freemarker.view-namesA whitelist of resolvable view names.

Groovy

spring.groovy.template.allow-request-overrideWhether attributes of HttpServletRequest are allowed to override (hide) controller-generated model attributes of the same name.

spring.groovy.template.allow-session-overrideWhether attributes of HttpSession are allowed to override (hide) controller-generated model attributes of the same name.

spring.groovy.template.cacheEnable template caching.

spring.groovy.template.charsetTemplate encoding.

spring.groovy.template.check-template-locationCheck if the template location exists.

spring.groovy.template.configuration.auto-escapeWhether to escape model variables when they are rendered in templates. (Default: false .)

spring.groovy.template.configuration.auto-indentWhether the template should automatically render indents. (Default: false .)

spring.groovy.template.configuration.auto-indent-stringThe string used for indentation when automatic indentation is turned on, which can be SPACES or TAB. (Default: SPACES .)

spring.groovy.template.configuration.auto-new-lineWhether to render new blank lines in the template. (Default: false .)

spring.groovy.template.configuration.base-template-classTemplate base class.

spring.groovy.template.configuration.cache-templatesWhether the template should be cached. (Default: true .)

spring.groovy.template.configuration.declaration-encodingThe encoding used to write the declaration header.

spring.groovy.template.configuration.expand-empty-elementsElements without text should be written in short form (eg, ) or expanded form (eg, ). (default: false)

spring.groovy.template.configuration.localeSet the template region.

spring.groovy.template.configuration.new-line-stringThe 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-pathPath to the Groovy template. (Default: classpath:/templates/ .)

spring.groovy.template.configuration.use-double-quotesWhether the attribute should be in double or single quotes. (Default: false .)

spring.groovy.template.content-typeThe value of Content-Type.

spring.groovy.template.enabledEnables MVC view parsing for Groovy templates.

spring.groovy.template.expose-request-attributesWhether to add all request attributes to the model before merging it into the template.

spring.groovy.template.expose-session-attributesWhether to add all HttpSession properties to the model before merging it into the template.

spring.groovy.template.expose-spring-macro-helpersWhether to publish a RequestContext for use by the Spring macro library and name it springMacro-RequestContext

spring.groovy.template.prefixPrefix to add to the view name when building the URL.

spring.groovy.template.request-context-attributeThe name of the RequestContext property used in all views.

spring.groovy.template.resource-loader-pathTemplate path (Default: classpath:/templates/ .)

spring.groovy.template.suffixSuffix added to the view name when building the URL.

spring.groovy.template.view-namesA whitelist of resolvable view names.

H2

spring.h2.console.enabledTurn on the console. (Default: false .)

spring.h2.console.pathThe path where the console can be found. (Default: /h2-console .)

Hornetq

spring.hornetq.embedded.cluster-passwordCluster password. Generated randomly at startup by default.

spring.hornetq.embedded.data-directorylog file directory. This property is not required if persistence is turned off.

spring.hornetq.embedded.enabledIf HornetQ server API is available, enable embedded mode. (Default: true .)

spring.hornetq.embedded.persistentEnable persistent storage. (Default: false .)

spring.hornetq.embedded.queuesComma-separated list of queues to create on startup. (Defaults: [] .)

spring.hornetq.embedded.server-idServer ID. By default an auto-incrementing counter is used. (Default: 0 .)

spring.hornetq.embedded.topicsA comma-separated list of topics to create on startup. (Defaults: [] .)

spring.hornetq.hostHornetQ's host. (Default: localhost .)

spring.hornetq.modeThe deployment mode of HornetQ, the default is automatic detection. Can be explicitly set to native or embedded.

spring.hornetq.portPort of HornetQ. (Default: 5445 .)

Http

spring.http.converters.preferred-json-mapperJSON mapper is preferred for HTTP message conversion.

spring.http.encoding.charsetCharacter 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.enabledEnable HTTP encoding support. (Default: true .)

spring.http.encoding.forceForces HTTP requests and responses to be encoded to the configured charset. (Default: true .)

Jackson

spring.jackson.date-formatDate format string (yyyy-MM-dd HH

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324821427&siteId=291194637