Polish documentation

Update reference documentation source to use consistent attribute names
and fix a few formatting issues.
pull/18464/head
Phillip Webb 5 years ago
parent db26d9dc91
commit 7f9d143e01

@ -1239,16 +1239,14 @@
<doctype>book</doctype> <doctype>book</doctype>
<attributes> <attributes>
<docinfo>true</docinfo> <docinfo>true</docinfo>
<jooq-version>${jooq.version}</jooq-version>
<spring-framework-version>${spring-framework.version}</spring-framework-version>
<spring-boot-version>${revision}</spring-boot-version>
<spring-boot-docs-version>${revision}</spring-boot-docs-version>
<spring-boot-repo>${spring-boot-repo}</spring-boot-repo> <spring-boot-repo>${spring-boot-repo}</spring-boot-repo>
<spring-docs-version>${spring-framework.version}</spring-docs-version>
<spring-integration-docs-version>${spring-integration.version}</spring-integration-docs-version>
<spring-security-docs-version>${spring-security.version}</spring-security-docs-version>
<spring-webservices-docs-version>${spring-ws.version}</spring-webservices-docs-version>
<github-tag>${github-tag}</github-tag> <github-tag>${github-tag}</github-tag>
<jooq-version>${jooq.version}</jooq-version>
<spring-boot-version>${revision}</spring-boot-version>
<spring-framework-version>${spring-framework.version}</spring-framework-version>
<spring-integration-version>${spring-integration.version}</spring-integration-version>
<spring-security-version>${spring-security.version}</spring-security-version>
<spring-webservices-version>${spring-ws.version}</spring-webservices-version>
</attributes> </attributes>
</configuration> </configuration>
</execution> </execution>
@ -1456,7 +1454,7 @@
</stringutil> </stringutil>
<var name="github-tag" value="v${revision}" /> <var name="github-tag" value="v${revision}" />
<propertyregex property="github-tag" override="true" <propertyregex property="github-tag" override="true"
input="${github-tag}" regexp=".*SNAPSHOT" replace="master" /> input="${github-tag}" regexp=".*SNAPSHOT" replace="2.1.x" />
</target> </target>
</configuration> </configuration>
</execution> </execution>

@ -49,10 +49,10 @@ Rather, pick only the properties that you need.
spring.aop.auto=true # Add @EnableAspectJAutoProxy. 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.aop.proxy-target-class=true # Whether subclass-based (CGLIB) proxies are to be created (true), as opposed to standard Java interface-based proxies (false).
# IDENTITY ({sc-spring-boot}/context/ContextIdApplicationContextInitializer.{sc-ext}[ContextIdApplicationContextInitializer]) # IDENTITY ({spring-boot-module-code}/context/ContextIdApplicationContextInitializer.java[ContextIdApplicationContextInitializer])
spring.application.name= # Application name. spring.application.name= # Application name.
# ADMIN ({sc-spring-boot-autoconfigure}/admin/SpringApplicationAdminJmxAutoConfiguration.{sc-ext}[SpringApplicationAdminJmxAutoConfiguration]) # ADMIN ({spring-boot-autoconfigure-module-code}/admin/SpringApplicationAdminJmxAutoConfiguration.java[SpringApplicationAdminJmxAutoConfiguration])
spring.application.admin.enabled=false # Whether to enable admin features for the application. 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.admin.jmx-name=org.springframework.boot:type=Admin,name=SpringApplication # JMX name of the application admin MBean.
@ -71,7 +71,7 @@ Rather, pick only the properties that you need.
# SPRING CORE # SPRING CORE
spring.beaninfo.ignore=true # Whether to skip search of BeanInfo classes. spring.beaninfo.ignore=true # Whether to skip search of BeanInfo classes.
# SPRING CACHE ({sc-spring-boot-autoconfigure}/cache/CacheProperties.{sc-ext}[CacheProperties]) # SPRING CACHE ({spring-boot-autoconfigure-module-code}/cache/CacheProperties.java[CacheProperties])
spring.cache.cache-names= # Comma-separated list of cache names to create if supported by the underlying cache manager. spring.cache.cache-names= # Comma-separated list of cache names to create if supported by the underlying cache manager.
spring.cache.caffeine.spec= # The spec to use to create caches. See CaffeineSpec for more details on the spec format. 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.couchbase.expiration= # Entry expiration. By default the entries never expire. Note that this value is ultimately converted to seconds.
@ -85,15 +85,15 @@ Rather, pick only the properties that you need.
spring.cache.redis.use-key-prefix=true # Whether to use the key prefix when writing to Redis. 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. spring.cache.type= # Cache type. By default, auto-detected according to the environment.
# SPRING CONFIG - using environment property only ({sc-spring-boot}/context/config/ConfigFileApplicationListener.{sc-ext}[ConfigFileApplicationListener]) # SPRING CONFIG - using environment property only ({spring-boot-module-code}/context/config/ConfigFileApplicationListener.java[ConfigFileApplicationListener])
spring.config.additional-location= # Config file locations used in addition to the defaults. spring.config.additional-location= # Config file locations used in addition to the defaults.
spring.config.location= # Config file locations that replace the defaults. spring.config.location= # Config file locations that replace the defaults.
spring.config.name=application # Config file name. spring.config.name=application # Config file name.
# HAZELCAST ({sc-spring-boot-autoconfigure}/hazelcast/HazelcastProperties.{sc-ext}[HazelcastProperties]) # HAZELCAST ({spring-boot-autoconfigure-module-code}/hazelcast/HazelcastProperties.java[HazelcastProperties])
spring.hazelcast.config= # The location of the configuration file to use to initialize Hazelcast. spring.hazelcast.config= # The location of the configuration file to use to initialize Hazelcast.
# PROJECT INFORMATION ({sc-spring-boot-autoconfigure}/info/ProjectInfoProperties.{sc-ext}[ProjectInfoProperties]) # PROJECT INFORMATION ({spring-boot-autoconfigure-module-code}/info/ProjectInfoProperties.java[ProjectInfoProperties])
spring.info.build.encoding=UTF-8 # File encoding. 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.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.encoding=UTF-8 # File encoding.
@ -105,7 +105,7 @@ Rather, pick only the properties that you need.
spring.jmx.server=mbeanServer # MBeanServer bean name. spring.jmx.server=mbeanServer # MBeanServer bean name.
spring.jmx.unique-names=false # Whether unique runtime object names should be ensured. spring.jmx.unique-names=false # Whether unique runtime object names should be ensured.
# Email ({sc-spring-boot-autoconfigure}/mail/MailProperties.{sc-ext}[MailProperties]) # Email ({spring-boot-autoconfigure-module-code}/mail/MailProperties.java[MailProperties])
spring.mail.default-encoding=UTF-8 # Default MimeMessage encoding. spring.mail.default-encoding=UTF-8 # Default MimeMessage encoding.
spring.mail.host= # SMTP server host. For instance, `smtp.example.com`. 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.jndi-name= # Session JNDI name. When set, takes precedence over other Session settings.
@ -116,16 +116,16 @@ Rather, pick only the properties that you need.
spring.mail.test-connection=false # Whether to test that the mail server is available on startup. 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.mail.username= # Login user of the SMTP server.
# APPLICATION SETTINGS ({sc-spring-boot}/SpringApplication.{sc-ext}[SpringApplication]) # APPLICATION SETTINGS ({spring-boot-module-code}/SpringApplication.java[SpringApplication])
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.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.banner-mode=console # Mode used to display the banner when the application runs.
spring.main.sources= # Sources (class names, package names, or XML resource locations) to include in the ApplicationContext. 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.main.web-application-type= # Flag to explicitly request a specific type of web application. If not set, auto-detected based on the classpath.
# FILE ENCODING ({sc-spring-boot}/context/FileEncodingApplicationListener.{sc-ext}[FileEncodingApplicationListener]) # FILE ENCODING ({spring-boot-module-code}/context/FileEncodingApplicationListener.java[FileEncodingApplicationListener])
spring.mandatory-file-encoding= # Expected character encoding the application must use. spring.mandatory-file-encoding= # Expected character encoding the application must use.
# INTERNATIONALIZATION ({sc-spring-boot-autoconfigure}/context/MessageSourceProperties.{sc-ext}[MessageSourceProperties]) # INTERNATIONALIZATION ({spring-boot-autoconfigure-module-code}/context/MessageSourceProperties.java[MessageSourceProperties])
spring.messages.always-use-message-format=false # Whether to always apply the MessageFormat rules, parsing even messages without arguments. 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. 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.
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.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.
@ -136,7 +136,7 @@ Rather, pick only the properties that you need.
# OUTPUT # OUTPUT
spring.output.ansi.enabled=detect # Configures the ANSI output. spring.output.ansi.enabled=detect # Configures the ANSI output.
# PID FILE ({sc-spring-boot}/context/ApplicationPidFileWriter.{sc-ext}[ApplicationPidFileWriter]) # PID FILE ({spring-boot-module-code}/context/ApplicationPidFileWriter.java[ApplicationPidFileWriter])
spring.pid.fail-on-write-error= # Fails if ApplicationPidFileWriter is used but it cannot write the PID file. 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.pid.file= # Location of the PID file to write (if ApplicationPidFileWriter is used).
@ -144,7 +144,7 @@ Rather, pick only the properties that you need.
spring.profiles.active= # Comma-separated list of active profiles. Can be overridden by a command line switch. spring.profiles.active= # Comma-separated list of active profiles. Can be overridden by a command line switch.
spring.profiles.include= # Unconditionally activate the specified comma-separated list of profiles (or list of profiles if using YAML). spring.profiles.include= # Unconditionally activate the specified comma-separated list of profiles (or list of profiles if using YAML).
# QUARTZ SCHEDULER ({sc-spring-boot-autoconfigure}/quartz/QuartzProperties.{sc-ext}[QuartzProperties]) # QUARTZ SCHEDULER ({spring-boot-autoconfigure-module-code}/quartz/QuartzProperties.java[QuartzProperties])
spring.quartz.auto-startup=true # Whether to automatically start the scheduler after initialization. spring.quartz.auto-startup=true # Whether to automatically start the scheduler after initialization.
spring.quartz.jdbc.comment-prefix=-- # Prefix for single-line comments in SQL initialization scripts. spring.quartz.jdbc.comment-prefix=-- # Prefix for single-line comments in SQL initialization scripts.
spring.quartz.jdbc.initialize-schema=embedded # Database schema initialization mode. spring.quartz.jdbc.initialize-schema=embedded # Database schema initialization mode.
@ -156,15 +156,15 @@ Rather, pick only the properties that you need.
spring.quartz.startup-delay=0s # Delay after which the scheduler is started once initialization completes. spring.quartz.startup-delay=0s # Delay after which the scheduler is started once initialization completes.
spring.quartz.wait-for-jobs-to-complete-on-shutdown=false # Whether to wait for running jobs to complete on shutdown. spring.quartz.wait-for-jobs-to-complete-on-shutdown=false # Whether to wait for running jobs to complete on shutdown.
# REACTOR ({sc-spring-boot-autoconfigure}/reactor/core/ReactorCoreProperties.{sc-ext}[ReactorCoreProperties]) # REACTOR ({spring-boot-autoconfigure-module-code}/reactor/core/ReactorCoreProperties.java[ReactorCoreProperties])
spring.reactor.stacktrace-mode.enabled=false # Whether Reactor should collect stacktrace information at runtime. spring.reactor.stacktrace-mode.enabled=false # Whether Reactor should collect stacktrace information at runtime.
# SENDGRID ({sc-spring-boot-autoconfigure}/sendgrid/SendGridAutoConfiguration.{sc-ext}[SendGridAutoConfiguration]) # SENDGRID ({spring-boot-autoconfigure-module-code}/sendgrid/SendGridAutoConfiguration.java[SendGridAutoConfiguration])
spring.sendgrid.api-key= # SendGrid API key. spring.sendgrid.api-key= # SendGrid API key.
spring.sendgrid.proxy.host= # SendGrid proxy host. spring.sendgrid.proxy.host= # SendGrid proxy host.
spring.sendgrid.proxy.port= # SendGrid proxy port. spring.sendgrid.proxy.port= # SendGrid proxy port.
# TASK EXECUTION ({sc-spring-boot-autoconfigure}/task/TaskExecutionProperties.{sc-ext}[TaskExecutionProperties]) # TASK EXECUTION ({spring-boot-autoconfigure-module-code}/task/TaskExecutionProperties.java[TaskExecutionProperties])
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.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.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.keep-alive=60s # Time limit for which threads may remain idle before being terminated.
@ -172,7 +172,7 @@ Rather, pick only the properties that you need.
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.pool.queue-capacity= # Queue capacity. An unbounded capacity does not increase the pool and therefore ignores the "max-size" property.
spring.task.execution.thread-name-prefix=task- # Prefix to use for the names of newly created threads. spring.task.execution.thread-name-prefix=task- # Prefix to use for the names of newly created threads.
# TASK SCHEDULING ({sc-spring-boot-autoconfigure}/task/TaskSchedulingProperties.{sc-ext}[TaskSchedulingProperties]) # TASK SCHEDULING ({spring-boot-autoconfigure-module-code}/task/TaskSchedulingProperties.java[TaskSchedulingProperties])
spring.task.scheduling.pool.size=1 # Maximum allowed number of threads. spring.task.scheduling.pool.size=1 # Maximum allowed number of threads.
spring.task.scheduling.thread-name-prefix=scheduling- # Prefix to use for the names of newly created threads. spring.task.scheduling.thread-name-prefix=scheduling- # Prefix to use for the names of newly created threads.
@ -180,7 +180,7 @@ Rather, pick only the properties that you need.
# WEB PROPERTIES # WEB PROPERTIES
# ---------------------------------------- # ----------------------------------------
# EMBEDDED SERVER CONFIGURATION ({sc-spring-boot-autoconfigure}/web/ServerProperties.{sc-ext}[ServerProperties]) # EMBEDDED SERVER CONFIGURATION ({spring-boot-autoconfigure-module-code}/web/ServerProperties.java[ServerProperties])
server.address= # Network address to which the server should bind. server.address= # Network address to which the server should bind.
server.compression.enabled=false # Whether response compression is enabled. server.compression.enabled=false # Whether response compression is enabled.
server.compression.excluded-user-agents= # Comma-separated list of user agents for which responses should not be compressed. server.compression.excluded-user-agents= # Comma-separated list of user agents for which responses should not be compressed.
@ -293,7 +293,7 @@ Rather, pick only the properties that you need.
server.undertow.max-http-post-size=-1B # Maximum size of the HTTP post content. When the value is -1, the default, the size is unlimited. server.undertow.max-http-post-size=-1B # Maximum size of the HTTP post content. When the value is -1, the default, the size is unlimited.
server.undertow.worker-threads= # Number of worker threads. The default is 8 times the number of I/O threads. server.undertow.worker-threads= # Number of worker threads. The default is 8 times the number of I/O threads.
# FREEMARKER ({sc-spring-boot-autoconfigure}/freemarker/FreeMarkerProperties.{sc-ext}[FreeMarkerProperties]) # FREEMARKER ({spring-boot-autoconfigure-module-code}/freemarker/FreeMarkerProperties.java[FreeMarkerProperties])
spring.freemarker.allow-request-override=false # Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. spring.freemarker.allow-request-override=false # Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.freemarker.allow-session-override=false # Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name. spring.freemarker.allow-session-override=false # Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.freemarker.cache=false # Whether to enable template caching. spring.freemarker.cache=false # Whether to enable template caching.
@ -312,7 +312,7 @@ Rather, pick only the properties that you need.
spring.freemarker.template-loader-path=classpath:/templates/ # Comma-separated list of template paths. spring.freemarker.template-loader-path=classpath:/templates/ # Comma-separated list of template paths.
spring.freemarker.view-names= # White list of view names that can be resolved. spring.freemarker.view-names= # White list of view names that can be resolved.
# GROOVY TEMPLATES ({sc-spring-boot-autoconfigure}/groovy/template/GroovyTemplateProperties.{sc-ext}[GroovyTemplateProperties]) # GROOVY TEMPLATES ({spring-boot-autoconfigure-module-code}/groovy/template/GroovyTemplateProperties.java[GroovyTemplateProperties])
spring.groovy.template.allow-request-override=false # Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. spring.groovy.template.allow-request-override=false # Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.groovy.template.allow-session-override=false # Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name. spring.groovy.template.allow-session-override=false # Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.groovy.template.cache=false # Whether to enable template caching. spring.groovy.template.cache=false # Whether to enable template caching.
@ -330,10 +330,10 @@ Rather, pick only the properties that you need.
spring.groovy.template.suffix=.tpl # Suffix that gets appended to view names when building a URL. spring.groovy.template.suffix=.tpl # Suffix that gets appended to view names when building a URL.
spring.groovy.template.view-names= # White list of view names that can be resolved. spring.groovy.template.view-names= # White list of view names that can be resolved.
# SPRING HATEOAS ({sc-spring-boot-autoconfigure}/hateoas/HateoasProperties.{sc-ext}[HateoasProperties]) # SPRING HATEOAS ({spring-boot-autoconfigure-module-code}/hateoas/HateoasProperties.java[HateoasProperties])
spring.hateoas.use-hal-as-default-json-media-type=true # Whether application/hal+json responses should be sent to requests that accept application/json. spring.hateoas.use-hal-as-default-json-media-type=true # Whether application/hal+json responses should be sent to requests that accept application/json.
# HTTP ({sc-spring-boot-autoconfigure}/http/HttpProperties.{sc-ext}[HttpProperties]) # HTTP ({spring-boot-autoconfigure-module-code}/http/HttpProperties.java[HttpProperties])
spring.http.converters.preferred-json-mapper= # Preferred JSON mapper to use for HTTP message conversion. By default, auto-detected according to the environment. spring.http.converters.preferred-json-mapper= # Preferred JSON mapper to use for HTTP message conversion. By default, auto-detected according to the environment.
spring.http.encoding.charset=UTF-8 # Charset of HTTP requests and responses. Added to the "Content-Type" header if not set explicitly. spring.http.encoding.charset=UTF-8 # Charset of HTTP requests and responses. Added to the "Content-Type" header if not set explicitly.
spring.http.encoding.enabled=true # Whether to enable http encoding support. spring.http.encoding.enabled=true # Whether to enable http encoding support.
@ -343,7 +343,7 @@ Rather, pick only the properties that you need.
spring.http.encoding.mapping= # Locale in which to encode mapping. spring.http.encoding.mapping= # Locale in which to encode mapping.
spring.http.log-request-details=false # Whether logging of (potentially sensitive) request details at DEBUG and TRACE level is allowed. spring.http.log-request-details=false # Whether logging of (potentially sensitive) request details at DEBUG and TRACE level is allowed.
# MULTIPART ({sc-spring-boot-autoconfigure}/web/servlet/MultipartProperties.{sc-ext}[MultipartProperties]) # MULTIPART ({spring-boot-autoconfigure-module-code}/web/servlet/MultipartProperties.java[MultipartProperties])
spring.servlet.multipart.enabled=true # Whether to enable support of multipart uploads. spring.servlet.multipart.enabled=true # Whether to enable support of multipart uploads.
spring.servlet.multipart.file-size-threshold=0B # Threshold after which files are written to disk. spring.servlet.multipart.file-size-threshold=0B # Threshold after which files are written to disk.
spring.servlet.multipart.location= # Intermediate location of uploaded files. spring.servlet.multipart.location= # Intermediate location of uploaded files.
@ -351,7 +351,7 @@ Rather, pick only the properties that you need.
spring.servlet.multipart.max-request-size=10MB # Max request size. spring.servlet.multipart.max-request-size=10MB # Max request size.
spring.servlet.multipart.resolve-lazily=false # Whether to resolve the multipart request lazily at the time of file or parameter access. spring.servlet.multipart.resolve-lazily=false # Whether to resolve the multipart request lazily at the time of file or parameter access.
# JACKSON ({sc-spring-boot-autoconfigure}/jackson/JacksonProperties.{sc-ext}[JacksonProperties]) # JACKSON ({spring-boot-autoconfigure-module-code}/jackson/JacksonProperties.java[JacksonProperties])
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.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.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.deserialization.*= # Jackson on/off features that affect the way Java objects are deserialized.
@ -365,7 +365,7 @@ Rather, pick only the properties that you need.
spring.jackson.time-zone= # Time zone used when formatting dates. For instance, "America/Los_Angeles" or "GMT+10". 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. spring.jackson.visibility.*= # Jackson visibility thresholds that can be used to limit which methods (and fields) are auto-detected.
# GSON ({sc-spring-boot-autoconfigure}/gson/GsonProperties.{sc-ext}[GsonProperties]) # GSON ({spring-boot-autoconfigure-module-code}/gson/GsonProperties.java[GsonProperties])
spring.gson.date-format= # Format to use when serializing Date objects. 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-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.disable-inner-class-serialization= # Whether to exclude inner classes during serialization.
@ -378,14 +378,14 @@ Rather, pick only the properties that you need.
spring.gson.pretty-printing= # Whether to output serialized JSON that fits in a page for pretty printing. 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.gson.serialize-nulls= # Whether to serialize null fields.
# JERSEY ({sc-spring-boot-autoconfigure}/jersey/JerseyProperties.{sc-ext}[JerseyProperties]) # JERSEY ({spring-boot-autoconfigure-module-code}/jersey/JerseyProperties.java[JerseyProperties])
spring.jersey.application-path= # Path that serves as the base URI for the application. If specified, overrides the value of "@ApplicationPath". spring.jersey.application-path= # Path that serves as the base URI for the application. If specified, overrides the value of "@ApplicationPath".
spring.jersey.filter.order=0 # Jersey filter chain order. spring.jersey.filter.order=0 # Jersey filter chain order.
spring.jersey.init.*= # Init parameters to pass to Jersey through the servlet or filter. spring.jersey.init.*= # Init parameters to pass to Jersey through the servlet or filter.
spring.jersey.servlet.load-on-startup=-1 # Load on startup priority of the Jersey servlet. spring.jersey.servlet.load-on-startup=-1 # Load on startup priority of the Jersey servlet.
spring.jersey.type=servlet # Jersey integration type. spring.jersey.type=servlet # Jersey integration type.
# SPRING LDAP ({sc-spring-boot-autoconfigure}/ldap/LdapProperties.{sc-ext}[LdapProperties]) # SPRING LDAP ({spring-boot-autoconfigure-module-code}/ldap/LdapProperties.java[LdapProperties])
spring.ldap.anonymous-read-only=false # Whether read-only operations should use an anonymous environment. spring.ldap.anonymous-read-only=false # Whether read-only operations should use an anonymous environment.
spring.ldap.base= # Base suffix from which all operations should originate. spring.ldap.base= # Base suffix from which all operations should originate.
spring.ldap.base-environment.*= # LDAP specification settings. spring.ldap.base-environment.*= # LDAP specification settings.
@ -393,7 +393,7 @@ Rather, pick only the properties that you need.
spring.ldap.urls= # LDAP URLs of the server. spring.ldap.urls= # LDAP URLs of the server.
spring.ldap.username= # Login username of the server. spring.ldap.username= # Login username of the server.
# EMBEDDED LDAP ({sc-spring-boot-autoconfigure}/ldap/embedded/EmbeddedLdapProperties.{sc-ext}[EmbeddedLdapProperties]) # EMBEDDED LDAP ({spring-boot-autoconfigure-module-code}/ldap/embedded/EmbeddedLdapProperties.java[EmbeddedLdapProperties])
spring.ldap.embedded.base-dn= # List of base DNs. spring.ldap.embedded.base-dn= # List of base DNs.
spring.ldap.embedded.credential.username= # Embedded LDAP username. spring.ldap.embedded.credential.username= # Embedded LDAP username.
spring.ldap.embedded.credential.password= # Embedded LDAP password. spring.ldap.embedded.credential.password= # Embedded LDAP password.
@ -402,7 +402,7 @@ Rather, pick only the properties that you need.
spring.ldap.embedded.validation.enabled=true # Whether to enable LDAP schema validation. spring.ldap.embedded.validation.enabled=true # Whether to enable LDAP schema validation.
spring.ldap.embedded.validation.schema= # Path to the custom schema. spring.ldap.embedded.validation.schema= # Path to the custom schema.
# MUSTACHE TEMPLATES ({sc-spring-boot-autoconfigure}/mustache/MustacheAutoConfiguration.{sc-ext}[MustacheAutoConfiguration]) # MUSTACHE TEMPLATES ({spring-boot-autoconfigure-module-code}/mustache/MustacheAutoConfiguration.java[MustacheAutoConfiguration])
spring.mustache.allow-request-override=false # Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. spring.mustache.allow-request-override=false # Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.mustache.allow-session-override=false # Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name. spring.mustache.allow-session-override=false # Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.mustache.cache=false # Whether to enable template caching. spring.mustache.cache=false # Whether to enable template caching.
@ -418,7 +418,7 @@ Rather, pick only the properties that you need.
spring.mustache.suffix=.mustache # Suffix to apply to template names. spring.mustache.suffix=.mustache # Suffix to apply to template names.
spring.mustache.view-names= # White list of view names that can be resolved. spring.mustache.view-names= # White list of view names that can be resolved.
# SPRING MVC ({sc-spring-boot-autoconfigure}/web/servlet/WebMvcProperties.{sc-ext}[WebMvcProperties]) # SPRING MVC ({spring-boot-autoconfigure-module-code}/web/servlet/WebMvcProperties.java[WebMvcProperties])
spring.mvc.async.request-timeout= # Amount of time before asynchronous request handling times out. spring.mvc.async.request-timeout= # Amount of time before asynchronous request handling times out.
spring.mvc.contentnegotiation.favor-parameter=false # Whether a request parameter ("format" by default) should be used to determine the requested media type. spring.mvc.contentnegotiation.favor-parameter=false # Whether a request parameter ("format" by default) should be used to determine the requested media type.
spring.mvc.contentnegotiation.favor-path-extension=false # Whether the path extension in the URL path should be used to determine the requested media type. spring.mvc.contentnegotiation.favor-path-extension=false # Whether the path extension in the URL path should be used to determine the requested media type.
@ -444,7 +444,7 @@ Rather, pick only the properties that you need.
spring.mvc.view.prefix= # Spring MVC view prefix. spring.mvc.view.prefix= # Spring MVC view prefix.
spring.mvc.view.suffix= # Spring MVC view suffix. spring.mvc.view.suffix= # Spring MVC view suffix.
# SPRING RESOURCES HANDLING ({sc-spring-boot-autoconfigure}/web/ResourceProperties.{sc-ext}[ResourceProperties]) # SPRING RESOURCES HANDLING ({spring-boot-autoconfigure-module-code}/web/ResourceProperties.java[ResourceProperties])
spring.resources.add-mappings=true # Whether to enable default resource handling. spring.resources.add-mappings=true # Whether to enable default resource handling.
spring.resources.cache.cachecontrol.cache-private= # Indicate that the response message is intended for a single user and must not be stored by a shared cache. spring.resources.cache.cachecontrol.cache-private= # Indicate that the response message is intended for a single user and must not be stored by a shared cache.
spring.resources.cache.cachecontrol.cache-public= # Indicate that any cache may store the response. spring.resources.cache.cachecontrol.cache-public= # Indicate that any cache may store the response.
@ -469,31 +469,31 @@ Rather, pick only the properties that you need.
spring.resources.chain.strategy.fixed.version= # Version string to use for the fixed Version Strategy. spring.resources.chain.strategy.fixed.version= # Version string to use for the fixed Version Strategy.
spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/ # Locations of static resources. spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/ # Locations of static resources.
# SPRING SESSION ({sc-spring-boot-autoconfigure}/session/SessionProperties.{sc-ext}[SessionProperties]) # SPRING SESSION ({spring-boot-autoconfigure-module-code}/session/SessionProperties.java[SessionProperties])
spring.session.store-type= # Session store type. spring.session.store-type= # Session store type.
spring.session.timeout= # Session timeout. If a duration suffix is not specified, seconds will be used. spring.session.timeout= # Session timeout. If a duration suffix is not specified, seconds will be used.
spring.session.servlet.filter-order=-2147483598 # Session repository filter order. spring.session.servlet.filter-order=-2147483598 # Session repository filter order.
spring.session.servlet.filter-dispatcher-types=async,error,request # Session repository filter dispatcher types. spring.session.servlet.filter-dispatcher-types=async,error,request # Session repository filter dispatcher types.
# SPRING SESSION HAZELCAST ({sc-spring-boot-autoconfigure}/session/HazelcastSessionProperties.{sc-ext}[HazelcastSessionProperties]) # SPRING SESSION HAZELCAST ({spring-boot-autoconfigure-module-code}/session/HazelcastSessionProperties.java[HazelcastSessionProperties])
spring.session.hazelcast.flush-mode=on-save # Sessions flush mode. spring.session.hazelcast.flush-mode=on-save # Sessions flush mode.
spring.session.hazelcast.map-name=spring:session:sessions # Name of the map used to store sessions. spring.session.hazelcast.map-name=spring:session:sessions # Name of the map used to store sessions.
# SPRING SESSION JDBC ({sc-spring-boot-autoconfigure}/session/JdbcSessionProperties.{sc-ext}[JdbcSessionProperties]) # SPRING SESSION JDBC ({spring-boot-autoconfigure-module-code}/session/JdbcSessionProperties.java[JdbcSessionProperties])
spring.session.jdbc.cleanup-cron=0 * * * * * # Cron expression for expired session cleanup job. spring.session.jdbc.cleanup-cron=0 * * * * * # Cron expression for expired session cleanup job.
spring.session.jdbc.initialize-schema=embedded # Database schema initialization mode. spring.session.jdbc.initialize-schema=embedded # Database schema initialization mode.
spring.session.jdbc.schema=classpath:org/springframework/session/jdbc/schema-@@platform@@.sql # Path to the SQL file to use to initialize the database schema. spring.session.jdbc.schema=classpath:org/springframework/session/jdbc/schema-@@platform@@.sql # Path to the SQL file to use to initialize the database schema.
spring.session.jdbc.table-name=SPRING_SESSION # Name of the database table used to store sessions. spring.session.jdbc.table-name=SPRING_SESSION # Name of the database table used to store sessions.
# SPRING SESSION MONGODB ({sc-spring-boot-autoconfigure}/session/MongoSessionProperties.{sc-ext}[MongoSessionProperties]) # SPRING SESSION MONGODB ({spring-boot-autoconfigure-module-code}/session/MongoSessionProperties.java[MongoSessionProperties])
spring.session.mongodb.collection-name=sessions # Collection name used to store sessions. spring.session.mongodb.collection-name=sessions # Collection name used to store sessions.
# SPRING SESSION REDIS ({sc-spring-boot-autoconfigure}/session/RedisSessionProperties.{sc-ext}[RedisSessionProperties]) # SPRING SESSION REDIS ({spring-boot-autoconfigure-module-code}/session/RedisSessionProperties.java[RedisSessionProperties])
spring.session.redis.cleanup-cron=0 * * * * * # Cron expression for expired session cleanup job. spring.session.redis.cleanup-cron=0 * * * * * # Cron expression for expired session cleanup job.
spring.session.redis.flush-mode=on-save # Sessions flush mode. spring.session.redis.flush-mode=on-save # Sessions flush mode.
spring.session.redis.namespace=spring:session # Namespace for keys used to store sessions. spring.session.redis.namespace=spring:session # Namespace for keys used to store sessions.
# THYMELEAF ({sc-spring-boot-autoconfigure}/thymeleaf/ThymeleafAutoConfiguration.{sc-ext}[ThymeleafAutoConfiguration]) # THYMELEAF ({spring-boot-autoconfigure-module-code}/thymeleaf/ThymeleafAutoConfiguration.java[ThymeleafAutoConfiguration])
spring.thymeleaf.cache=true # Whether to enable template caching. spring.thymeleaf.cache=true # Whether to enable template caching.
spring.thymeleaf.check-template=true # Whether to check that the template exists before rendering it. spring.thymeleaf.check-template=true # Whether to check that the template exists before rendering it.
spring.thymeleaf.check-template-location=true # Whether to check that the templates location exists. spring.thymeleaf.check-template-location=true # Whether to check that the templates location exists.
@ -514,12 +514,12 @@ Rather, pick only the properties that you need.
spring.thymeleaf.template-resolver-order= # Order of the template resolver in the chain. spring.thymeleaf.template-resolver-order= # Order of the template resolver in the chain.
spring.thymeleaf.view-names= # Comma-separated list of view names (patterns allowed) that can be resolved. spring.thymeleaf.view-names= # Comma-separated list of view names (patterns allowed) that can be resolved.
# SPRING WEBFLUX ({sc-spring-boot-autoconfigure}/web/reactive/WebFluxProperties.{sc-ext}[WebFluxProperties]) # SPRING WEBFLUX ({spring-boot-autoconfigure-module-code}/web/reactive/WebFluxProperties.java[WebFluxProperties])
spring.webflux.date-format= # Date format to use. For instance, `dd/MM/yyyy`. spring.webflux.date-format= # Date format to use. For instance, `dd/MM/yyyy`.
spring.webflux.hiddenmethod.filter.enabled=true # Whether to enable Spring's HiddenHttpMethodFilter. spring.webflux.hiddenmethod.filter.enabled=true # Whether to enable Spring's HiddenHttpMethodFilter.
spring.webflux.static-path-pattern=/** # Path pattern used for static resources. spring.webflux.static-path-pattern=/** # Path pattern used for static resources.
# SPRING WEB SERVICES ({sc-spring-boot-autoconfigure}/webservices/WebServicesProperties.{sc-ext}[WebServicesProperties]) # SPRING WEB SERVICES ({spring-boot-autoconfigure-module-code}/webservices/WebServicesProperties.java[WebServicesProperties])
spring.webservices.path=/services # Path that serves as the base URI for the services. spring.webservices.path=/services # Path that serves as the base URI for the services.
spring.webservices.servlet.init= # Servlet init parameters to pass to Spring Web Services. spring.webservices.servlet.init= # Servlet init parameters to pass to Spring Web Services.
spring.webservices.servlet.load-on-startup=-1 # Load on startup priority of the Spring Web Services servlet. spring.webservices.servlet.load-on-startup=-1 # Load on startup priority of the Spring Web Services servlet.
@ -529,18 +529,18 @@ Rather, pick only the properties that you need.
# ---------------------------------------- # ----------------------------------------
# SECURITY PROPERTIES # SECURITY PROPERTIES
# ---------------------------------------- # ----------------------------------------
# SECURITY ({sc-spring-boot-autoconfigure}/security/SecurityProperties.{sc-ext}[SecurityProperties]) # SECURITY ({spring-boot-autoconfigure-module-code}/security/SecurityProperties.java[SecurityProperties])
spring.security.filter.order=-100 # Security filter chain order. spring.security.filter.order=-100 # Security filter chain order.
spring.security.filter.dispatcher-types=async,error,request # Security filter chain dispatcher types. spring.security.filter.dispatcher-types=async,error,request # Security filter chain dispatcher types.
spring.security.user.name=user # Default user name. spring.security.user.name=user # Default user name.
spring.security.user.password= # Password for the default user name. spring.security.user.password= # Password for the default user name.
spring.security.user.roles= # Granted roles for the default user name. spring.security.user.roles= # Granted roles for the default user name.
# SECURITY OAUTH2 CLIENT ({sc-spring-boot-autoconfigure}/security/oauth2/client/OAuth2ClientProperties.{sc-ext}[OAuth2ClientProperties]) # SECURITY OAUTH2 CLIENT ({spring-boot-autoconfigure-module-code}/security/oauth2/client/OAuth2ClientProperties.java[OAuth2ClientProperties])
spring.security.oauth2.client.provider.*= # OAuth provider details. spring.security.oauth2.client.provider.*= # OAuth provider details.
spring.security.oauth2.client.registration.*= # OAuth client registrations. spring.security.oauth2.client.registration.*= # OAuth client registrations.
# SECURITY OAUTH2 RESOURCE SERVER ({sc-spring-boot-autoconfigure}/security/oauth2/resource/OAuth2ResourceServerProperties.{sc-ext}[OAuth2ResourceServerProperties]) # SECURITY OAUTH2 RESOURCE SERVER ({spring-boot-autoconfigure-module-code}/security/oauth2/resource/OAuth2ResourceServerProperties.java[OAuth2ResourceServerProperties])
spring.security.oauth2.resourceserver.jwt.jwk-set-uri= # JSON Web Key URI to use to verify the JWT token. spring.security.oauth2.resourceserver.jwt.jwk-set-uri= # JSON Web Key URI to use to verify the JWT token.
spring.security.oauth2.resourceserver.jwt.issuer-uri= # URI that an OpenID Connect Provider asserts as its Issuer Identifier. spring.security.oauth2.resourceserver.jwt.issuer-uri= # URI that an OpenID Connect Provider asserts as its Issuer Identifier.
@ -548,7 +548,7 @@ Rather, pick only the properties that you need.
# DATA PROPERTIES # DATA PROPERTIES
# ---------------------------------------- # ----------------------------------------
# FLYWAY ({sc-spring-boot-autoconfigure}/flyway/FlywayProperties.{sc-ext}[FlywayProperties]) # FLYWAY ({spring-boot-autoconfigure-module-code}/flyway/FlywayProperties.java[FlywayProperties])
spring.flyway.baseline-description=<< Flyway Baseline >> # Description to tag an existing schema with when applying a baseline. spring.flyway.baseline-description=<< Flyway Baseline >> # Description to tag an existing schema with when applying a baseline.
spring.flyway.baseline-on-migrate=false # Whether to automatically call baseline when migrating a non-empty schema. spring.flyway.baseline-on-migrate=false # Whether to automatically call baseline when migrating a non-empty schema.
spring.flyway.baseline-version=1 # Version to tag an existing schema with when executing baseline. spring.flyway.baseline-version=1 # Version to tag an existing schema with when executing baseline.
@ -586,7 +586,7 @@ Rather, pick only the properties that you need.
spring.flyway.user= # Login user of the database to migrate. spring.flyway.user= # Login user of the database to migrate.
spring.flyway.validate-on-migrate=true # Whether to automatically call validate when performing a migration. spring.flyway.validate-on-migrate=true # Whether to automatically call validate when performing a migration.
# LIQUIBASE ({sc-spring-boot-autoconfigure}/liquibase/LiquibaseProperties.{sc-ext}[LiquibaseProperties]) # LIQUIBASE ({spring-boot-autoconfigure-module-code}/liquibase/LiquibaseProperties.java[LiquibaseProperties])
spring.liquibase.change-log=classpath:/db/changelog/db.changelog-master.yaml # Change log configuration path. spring.liquibase.change-log=classpath:/db/changelog/db.changelog-master.yaml # Change log configuration path.
spring.liquibase.contexts= # Comma-separated list of runtime contexts to use. spring.liquibase.contexts= # Comma-separated list of runtime contexts to use.
spring.liquibase.database-change-log-lock-table=DATABASECHANGELOGLOCK # Name of table to use for tracking concurrent Liquibase usage. spring.liquibase.database-change-log-lock-table=DATABASECHANGELOGLOCK # Name of table to use for tracking concurrent Liquibase usage.
@ -604,7 +604,7 @@ Rather, pick only the properties that you need.
spring.liquibase.url= # JDBC URL of the database to migrate. If not set, the primary configured data source is used. spring.liquibase.url= # JDBC URL of the database to migrate. If not set, the primary configured data source is used.
spring.liquibase.user= # Login user of the database to migrate. spring.liquibase.user= # Login user of the database to migrate.
# COUCHBASE ({sc-spring-boot-autoconfigure}/couchbase/CouchbaseProperties.{sc-ext}[CouchbaseProperties]) # COUCHBASE ({spring-boot-autoconfigure-module-code}/couchbase/CouchbaseProperties.java[CouchbaseProperties])
spring.couchbase.bootstrap-hosts= # Couchbase nodes (host or IP address) to bootstrap from. spring.couchbase.bootstrap-hosts= # Couchbase nodes (host or IP address) to bootstrap from.
spring.couchbase.bucket.name=default # Name of the bucket to connect to. spring.couchbase.bucket.name=default # Name of the bucket to connect to.
spring.couchbase.bucket.password= # Password of the bucket. spring.couchbase.bucket.password= # Password of the bucket.
@ -622,10 +622,10 @@ Rather, pick only the properties that you need.
spring.couchbase.env.timeouts.socket-connect=1000ms # Socket connect connections timeout. spring.couchbase.env.timeouts.socket-connect=1000ms # Socket connect connections timeout.
spring.couchbase.env.timeouts.view=7500ms # Regular and geospatial view operations timeout. spring.couchbase.env.timeouts.view=7500ms # Regular and geospatial view operations timeout.
# DAO ({sc-spring-boot-autoconfigure}/dao/PersistenceExceptionTranslationAutoConfiguration.{sc-ext}[PersistenceExceptionTranslationAutoConfiguration]) # DAO ({spring-boot-autoconfigure-module-code}/dao/PersistenceExceptionTranslationAutoConfiguration.java[PersistenceExceptionTranslationAutoConfiguration])
spring.dao.exceptiontranslation.enabled=true # Whether to enable the PersistenceExceptionTranslationPostProcessor. spring.dao.exceptiontranslation.enabled=true # Whether to enable the PersistenceExceptionTranslationPostProcessor.
# CASSANDRA ({sc-spring-boot-autoconfigure}/cassandra/CassandraProperties.{sc-ext}[CassandraProperties]) # CASSANDRA ({spring-boot-autoconfigure-module-code}/cassandra/CassandraProperties.java[CassandraProperties])
spring.data.cassandra.cluster-name= # Name of the Cassandra cluster. spring.data.cassandra.cluster-name= # Name of the Cassandra cluster.
spring.data.cassandra.compression=none # Compression supported by the Cassandra binary protocol. spring.data.cassandra.compression=none # Compression supported by the Cassandra binary protocol.
spring.data.cassandra.connect-timeout= # Socket option: connection time out. spring.data.cassandra.connect-timeout= # Socket option: connection time out.
@ -647,12 +647,12 @@ Rather, pick only the properties that you need.
spring.data.cassandra.ssl=false # Enable SSL support. spring.data.cassandra.ssl=false # Enable SSL support.
spring.data.cassandra.username= # Login user of the server. spring.data.cassandra.username= # Login user of the server.
# DATA COUCHBASE ({sc-spring-boot-autoconfigure}/data/couchbase/CouchbaseDataProperties.{sc-ext}[CouchbaseDataProperties]) # DATA COUCHBASE ({spring-boot-autoconfigure-module-code}/data/couchbase/CouchbaseDataProperties.java[CouchbaseDataProperties])
spring.data.couchbase.auto-index=false # Automatically create views and indexes. spring.data.couchbase.auto-index=false # Automatically create views and indexes.
spring.data.couchbase.consistency=read-your-own-writes # Consistency to apply by default on generated queries. spring.data.couchbase.consistency=read-your-own-writes # Consistency to apply by default on generated queries.
spring.data.couchbase.repositories.type=auto # Type of Couchbase repositories to enable. spring.data.couchbase.repositories.type=auto # Type of Couchbase repositories to enable.
# ELASTICSEARCH ({sc-spring-boot-autoconfigure}/data/elasticsearch/ElasticsearchProperties.{sc-ext}[ElasticsearchProperties]) # ELASTICSEARCH ({spring-boot-autoconfigure-module-code}/data/elasticsearch/ElasticsearchProperties.java[ElasticsearchProperties])
spring.data.elasticsearch.cluster-name=elasticsearch # Elasticsearch cluster name. spring.data.elasticsearch.cluster-name=elasticsearch # Elasticsearch cluster name.
spring.data.elasticsearch.cluster-nodes= # Comma-separated list of cluster node addresses. spring.data.elasticsearch.cluster-nodes= # Comma-separated list of cluster node addresses.
spring.data.elasticsearch.properties.*= # Additional properties used to configure the client. spring.data.elasticsearch.properties.*= # Additional properties used to configure the client.
@ -664,7 +664,7 @@ Rather, pick only the properties that you need.
# DATA LDAP # DATA LDAP
spring.data.ldap.repositories.enabled=true # Whether to enable LDAP repositories. spring.data.ldap.repositories.enabled=true # Whether to enable LDAP repositories.
# MONGODB ({sc-spring-boot-autoconfigure}/mongo/MongoProperties.{sc-ext}[MongoProperties]) # MONGODB ({spring-boot-autoconfigure-module-code}/mongo/MongoProperties.java[MongoProperties])
spring.data.mongodb.authentication-database= # Authentication database name. spring.data.mongodb.authentication-database= # Authentication database name.
spring.data.mongodb.database= # Database name. spring.data.mongodb.database= # Database name.
spring.data.mongodb.field-naming-strategy= # Fully qualified name of the FieldNamingStrategy to use. spring.data.mongodb.field-naming-strategy= # Fully qualified name of the FieldNamingStrategy to use.
@ -679,7 +679,7 @@ Rather, pick only the properties that you need.
# DATA REDIS # DATA REDIS
spring.data.redis.repositories.enabled=true # Whether to enable Redis repositories. spring.data.redis.repositories.enabled=true # Whether to enable Redis repositories.
# NEO4J ({sc-spring-boot-autoconfigure}/data/neo4j/Neo4jProperties.{sc-ext}[Neo4jProperties]) # NEO4J ({spring-boot-autoconfigure-module-code}/data/neo4j/Neo4jProperties.java[Neo4jProperties])
spring.data.neo4j.auto-index=none # Auto index mode. spring.data.neo4j.auto-index=none # Auto index mode.
spring.data.neo4j.embedded.enabled=true # Whether to enable embedded mode if the embedded driver is available. spring.data.neo4j.embedded.enabled=true # Whether to enable embedded mode if the embedded driver is available.
spring.data.neo4j.open-in-view=true # Register OpenSessionInViewInterceptor. Binds a Neo4j Session to the thread for the entire processing of the request. spring.data.neo4j.open-in-view=true # Register OpenSessionInViewInterceptor. Binds a Neo4j Session to the thread for the entire processing of the request.
@ -688,7 +688,7 @@ Rather, pick only the properties that you need.
spring.data.neo4j.uri= # URI used by the driver. Auto-detected by default. spring.data.neo4j.uri= # URI used by the driver. Auto-detected by default.
spring.data.neo4j.username= # Login user of the server. spring.data.neo4j.username= # Login user of the server.
# DATA REST ({sc-spring-boot-autoconfigure}/data/rest/RepositoryRestProperties.{sc-ext}[RepositoryRestProperties]) # DATA REST ({spring-boot-autoconfigure-module-code}/data/rest/RepositoryRestProperties.java[RepositoryRestProperties])
spring.data.rest.base-path= # Base path to be used by Spring Data REST to expose repository resources. 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-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.default-page-size= # Default size of pages.
@ -701,12 +701,12 @@ Rather, pick only the properties that you need.
spring.data.rest.return-body-on-update= # Whether to return a response body after updating 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.rest.sort-param-name= # Name of the URL query string parameter that indicates what direction to sort results.
# SOLR ({sc-spring-boot-autoconfigure}/solr/SolrProperties.{sc-ext}[SolrProperties]) # SOLR ({spring-boot-autoconfigure-module-code}/solr/SolrProperties.java[SolrProperties])
spring.data.solr.host=http://127.0.0.1:8983/solr # Solr host. Ignored if "zk-host" is set. spring.data.solr.host=http://127.0.0.1:8983/solr # Solr host. Ignored if "zk-host" is set.
spring.data.solr.repositories.enabled=true # Whether to enable Solr repositories. spring.data.solr.repositories.enabled=true # Whether to enable Solr repositories.
spring.data.solr.zk-host= # ZooKeeper host address in the form HOST:PORT. spring.data.solr.zk-host= # ZooKeeper host address in the form HOST:PORT.
# DATA WEB ({sc-spring-boot-autoconfigure}/data/web/SpringDataWebProperties.{sc-ext}[SpringDataWebProperties]) # DATA WEB ({spring-boot-autoconfigure-module-code}/data/web/SpringDataWebProperties.java[SpringDataWebProperties])
spring.data.web.pageable.default-page-size=20 # Default page size. 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.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. spring.data.web.pageable.one-indexed-parameters=false # Whether to expose and assume 1-based page number indexes.
@ -716,7 +716,7 @@ Rather, pick only the properties that you need.
spring.data.web.pageable.size-parameter=size # Page size parameter name. spring.data.web.pageable.size-parameter=size # Page size parameter name.
spring.data.web.sort.sort-parameter=sort # Sort parameter name. spring.data.web.sort.sort-parameter=sort # Sort parameter name.
# DATASOURCE ({sc-spring-boot-autoconfigure}/jdbc/DataSourceAutoConfiguration.{sc-ext}[DataSourceAutoConfiguration] & {sc-spring-boot-autoconfigure}/jdbc/DataSourceProperties.{sc-ext}[DataSourceProperties]) # DATASOURCE ({spring-boot-autoconfigure-module-code}/jdbc/DataSourceAutoConfiguration.java[DataSourceAutoConfiguration] & {spring-boot-autoconfigure-module-code}/jdbc/DataSourceProperties.java[DataSourceProperties])
spring.datasource.continue-on-error=false # Whether to stop if an error occurs while initializing the database. 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= # Data (DML) script resource references.
spring.datasource.data-username= # Username of the database to execute DML scripts (if different). spring.datasource.data-username= # Username of the database to execute DML scripts (if different).
@ -743,7 +743,7 @@ Rather, pick only the properties that you need.
spring.datasource.xa.data-source-class-name= # XA datasource fully qualified name. 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.datasource.xa.properties= # Properties to pass to the XA data source.
# JEST (Elasticsearch HTTP client) ({sc-spring-boot-autoconfigure}/elasticsearch/jest/JestProperties.{sc-ext}[JestProperties]) # JEST (Elasticsearch HTTP client) ({spring-boot-autoconfigure-module-code}/elasticsearch/jest/JestProperties.java[JestProperties])
spring.elasticsearch.jest.connection-timeout=3s # Connection timeout. spring.elasticsearch.jest.connection-timeout=3s # Connection timeout.
spring.elasticsearch.jest.multi-threaded=true # Whether to enable connection requests from multiple execution threads. spring.elasticsearch.jest.multi-threaded=true # Whether to enable connection requests from multiple execution threads.
spring.elasticsearch.jest.password= # Login password. spring.elasticsearch.jest.password= # Login password.
@ -753,31 +753,31 @@ Rather, pick only the properties that you need.
spring.elasticsearch.jest.uris=http://localhost:9200 # Comma-separated list of the Elasticsearch instances to use. spring.elasticsearch.jest.uris=http://localhost:9200 # Comma-separated list of the Elasticsearch instances to use.
spring.elasticsearch.jest.username= # Login username. spring.elasticsearch.jest.username= # Login username.
# Elasticsearch REST clients ({sc-spring-boot-autoconfigure}/elasticsearch/rest/RestClientProperties.{sc-ext}[RestClientProperties]) # Elasticsearch REST clients ({spring-boot-autoconfigure-module-code}/elasticsearch/rest/RestClientProperties.java[RestClientProperties])
spring.elasticsearch.rest.password= # Credentials password. spring.elasticsearch.rest.password= # Credentials password.
spring.elasticsearch.rest.uris=http://localhost:9200 # Comma-separated list of the Elasticsearch instances to use. spring.elasticsearch.rest.uris=http://localhost:9200 # Comma-separated list of the Elasticsearch instances to use.
spring.elasticsearch.rest.username= # Credentials username. spring.elasticsearch.rest.username= # Credentials username.
# H2 Web Console ({sc-spring-boot-autoconfigure}/h2/H2ConsoleProperties.{sc-ext}[H2ConsoleProperties]) # H2 Web Console ({spring-boot-autoconfigure-module-code}/h2/H2ConsoleProperties.java[H2ConsoleProperties])
spring.h2.console.enabled=false # Whether to enable the console. 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.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.trace=false # Whether to enable trace output.
spring.h2.console.settings.web-allow-others=false # Whether to enable remote access. spring.h2.console.settings.web-allow-others=false # Whether to enable remote access.
# InfluxDB ({sc-spring-boot-autoconfigure}/influx/InfluxDbProperties.{sc-ext}[InfluxDbProperties]) # InfluxDB ({spring-boot-autoconfigure-module-code}/influx/InfluxDbProperties.java[InfluxDbProperties])
spring.influx.password= # Login password. spring.influx.password= # Login password.
spring.influx.url= # URL of the InfluxDB instance to which to connect. spring.influx.url= # URL of the InfluxDB instance to which to connect.
spring.influx.user= # Login user. spring.influx.user= # Login user.
# JOOQ ({sc-spring-boot-autoconfigure}/jooq/JooqProperties.{sc-ext}[JooqProperties]) # JOOQ ({spring-boot-autoconfigure-module-code}/jooq/JooqProperties.java[JooqProperties])
spring.jooq.sql-dialect= # SQL dialect to use. Auto-detected by default. spring.jooq.sql-dialect= # SQL dialect to use. Auto-detected by default.
# JDBC ({sc-spring-boot-autoconfigure}/jdbc/JdbcProperties.{sc-ext}[JdbcProperties]) # JDBC ({spring-boot-autoconfigure-module-code}/jdbc/JdbcProperties.java[JdbcProperties])
spring.jdbc.template.fetch-size=-1 # Number of rows that should be fetched from the database when more rows are needed. spring.jdbc.template.fetch-size=-1 # Number of rows that should be fetched from the database when more rows are needed.
spring.jdbc.template.max-rows=-1 # Maximum number of rows. spring.jdbc.template.max-rows=-1 # Maximum number of rows.
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.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.
# JPA ({sc-spring-boot-autoconfigure}/orm/jpa/JpaBaseConfiguration.{sc-ext}[JpaBaseConfiguration], {sc-spring-boot-autoconfigure}/orm/jpa/HibernateJpaAutoConfiguration.{sc-ext}[HibernateJpaAutoConfiguration]) # JPA ({spring-boot-autoconfigure-module-code}/orm/jpa/JpaBaseConfiguration.java[JpaBaseConfiguration], {spring-boot-autoconfigure-module-code}/orm/jpa/HibernateJpaAutoConfiguration.java[HibernateJpaAutoConfiguration])
spring.data.jpa.repositories.bootstrap-mode=default # Bootstrap mode for JPA 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.jpa.repositories.enabled=true # Whether to enable JPA repositories.
spring.jpa.database= # Target database to operate on, auto-detected by default. Can be alternatively set using the "databasePlatform" property. spring.jpa.database= # Target database to operate on, auto-detected by default. Can be alternatively set using the "databasePlatform" property.
@ -792,12 +792,12 @@ Rather, pick only the properties that you need.
spring.jpa.properties.*= # Additional native properties to set on the JPA provider. 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.jpa.show-sql=false # Whether to enable logging of SQL statements.
# JTA ({sc-spring-boot-autoconfigure}/transaction/jta/JtaAutoConfiguration.{sc-ext}[JtaAutoConfiguration]) # JTA ({spring-boot-autoconfigure-module-code}/transaction/jta/JtaAutoConfiguration.java[JtaAutoConfiguration])
spring.jta.enabled=true # Whether to enable JTA support. spring.jta.enabled=true # Whether to enable JTA support.
spring.jta.log-dir= # Transaction logs directory. spring.jta.log-dir= # Transaction logs directory.
spring.jta.transaction-manager-id= # Transaction manager unique identifier. spring.jta.transaction-manager-id= # Transaction manager unique identifier.
# ATOMIKOS ({sc-spring-boot}/jta/atomikos/AtomikosProperties.{sc-ext}[AtomikosProperties]) # ATOMIKOS ({spring-boot-module-code}/jta/atomikos/AtomikosProperties.java[AtomikosProperties])
spring.jta.atomikos.connectionfactory.borrow-connection-timeout=30 # Timeout, in seconds, for borrowing connections from the pool. 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.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.local-transaction-mode=false # Whether local transactions are desired.
@ -914,14 +914,14 @@ Rather, pick only the properties that you need.
spring.jta.bitronix.properties.skip-corrupted-logs=false # Skip corrupted transactions log entries. spring.jta.bitronix.properties.skip-corrupted-logs=false # Skip corrupted transactions log entries.
spring.jta.bitronix.properties.warn-about-zero-resource-transaction=true # Whether to log a warning for transactions executed without a single enlisted resource. spring.jta.bitronix.properties.warn-about-zero-resource-transaction=true # Whether to log a warning for transactions executed without a single enlisted resource.
# EMBEDDED MONGODB ({sc-spring-boot-autoconfigure}/mongo/embedded/EmbeddedMongoProperties.{sc-ext}[EmbeddedMongoProperties]) # EMBEDDED MONGODB ({spring-boot-autoconfigure-module-code}/mongo/embedded/EmbeddedMongoProperties.java[EmbeddedMongoProperties])
spring.mongodb.embedded.features=sync_delay # Comma-separated list of features to enable. spring.mongodb.embedded.features=sync_delay # Comma-separated list of features to enable.
spring.mongodb.embedded.storage.database-dir= # Directory used for data storage. 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.oplog-size= # Maximum size of the oplog.
spring.mongodb.embedded.storage.repl-set-name= # Name of the replica set. 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.mongodb.embedded.version=3.5.5 # Version of Mongo to use.
# REDIS ({sc-spring-boot-autoconfigure}/data/redis/RedisProperties.{sc-ext}[RedisProperties]) # REDIS ({spring-boot-autoconfigure-module-code}/data/redis/RedisProperties.java[RedisProperties])
spring.redis.cluster.max-redirects= # Maximum number of redirects to follow when executing commands across the cluster. 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. spring.redis.cluster.nodes= # Comma-separated list of "host:port" pairs to bootstrap from.
spring.redis.database=0 # Database index used by the connection factory. spring.redis.database=0 # Database index used by the connection factory.
@ -943,7 +943,7 @@ Rather, pick only the properties that you need.
spring.redis.ssl=false # Whether to enable SSL support. spring.redis.ssl=false # Whether to enable SSL support.
spring.redis.timeout= # Connection timeout. spring.redis.timeout= # Connection timeout.
# TRANSACTION ({sc-spring-boot-autoconfigure}/transaction/TransactionProperties.{sc-ext}[TransactionProperties]) # TRANSACTION ({spring-boot-autoconfigure-module-code}/transaction/TransactionProperties.java[TransactionProperties])
spring.transaction.default-timeout= # Default transaction timeout. If a duration suffix is not specified, seconds will be used. spring.transaction.default-timeout= # Default transaction timeout. If a duration suffix is not specified, seconds will be used.
spring.transaction.rollback-on-commit-failure= # Whether to roll back on commit failures. spring.transaction.rollback-on-commit-failure= # Whether to roll back on commit failures.
@ -953,7 +953,7 @@ Rather, pick only the properties that you need.
# INTEGRATION PROPERTIES # INTEGRATION PROPERTIES
# ---------------------------------------- # ----------------------------------------
# ACTIVEMQ ({sc-spring-boot-autoconfigure}/jms/activemq/ActiveMQProperties.{sc-ext}[ActiveMQProperties]) # ACTIVEMQ ({spring-boot-autoconfigure-module-code}/jms/activemq/ActiveMQProperties.java[ActiveMQProperties])
spring.activemq.broker-url= # URL of the ActiveMQ broker. Auto-generated by default. spring.activemq.broker-url= # URL of the ActiveMQ broker. Auto-generated by default.
spring.activemq.close-timeout=15s # Time to wait before considering a close complete. spring.activemq.close-timeout=15s # Time to wait before considering a close complete.
spring.activemq.in-memory=true # Whether the default broker URL should be in memory. Ignored if an explicit broker has been specified. spring.activemq.in-memory=true # Whether the default broker URL should be in memory. Ignored if an explicit broker has been specified.
@ -972,7 +972,7 @@ Rather, pick only the properties that you need.
spring.activemq.pool.time-between-expiration-check=-1ms # Time to sleep between runs of the idle connection eviction thread. When negative, no idle connection eviction thread runs. spring.activemq.pool.time-between-expiration-check=-1ms # Time to sleep between runs of the idle connection eviction thread. When negative, no idle connection eviction thread runs.
spring.activemq.pool.use-anonymous-producers=true # Whether to use only one anonymous "MessageProducer" instance. Set it to false to create one "MessageProducer" every time one is required. spring.activemq.pool.use-anonymous-producers=true # Whether to use only one anonymous "MessageProducer" instance. Set it to false to create one "MessageProducer" every time one is required.
# ARTEMIS ({sc-spring-boot-autoconfigure}/jms/artemis/ArtemisProperties.{sc-ext}[ArtemisProperties]) # ARTEMIS ({spring-boot-autoconfigure-module-code}/jms/artemis/ArtemisProperties.java[ArtemisProperties])
spring.artemis.embedded.cluster-password= # Cluster password. Randomly generated on startup by default. spring.artemis.embedded.cluster-password= # Cluster password. Randomly generated on startup by default.
spring.artemis.embedded.data-directory= # Journal file directory. Not necessary if persistence is turned off. spring.artemis.embedded.data-directory= # Journal file directory. Not necessary if persistence is turned off.
spring.artemis.embedded.enabled=true # Whether to enable embedded mode if the Artemis server APIs are available. spring.artemis.embedded.enabled=true # Whether to enable embedded mode if the Artemis server APIs are available.
@ -994,18 +994,18 @@ Rather, pick only the properties that you need.
spring.artemis.port=61616 # Artemis broker port. spring.artemis.port=61616 # Artemis broker port.
spring.artemis.user= # Login user of the broker. spring.artemis.user= # Login user of the broker.
# SPRING BATCH ({sc-spring-boot-autoconfigure}/batch/BatchProperties.{sc-ext}[BatchProperties]) # SPRING BATCH ({spring-boot-autoconfigure-module-code}/batch/BatchProperties.java[BatchProperties])
spring.batch.initialize-schema=embedded # Database schema initialization mode. spring.batch.initialize-schema=embedded # Database schema initialization mode.
spring.batch.job.enabled=true # Execute all Spring Batch jobs in the context on startup. spring.batch.job.enabled=true # Execute all Spring Batch jobs in the context on startup.
spring.batch.job.names= # Comma-separated list of job names to execute on startup (for instance, `job1,job2`). By default, all Jobs found in the context are executed. spring.batch.job.names= # Comma-separated list of job names to execute on startup (for instance, `job1,job2`). By default, all Jobs found in the context are executed.
spring.batch.schema=classpath:org/springframework/batch/core/schema-@@platform@@.sql # Path to the SQL file to use to initialize the database schema. spring.batch.schema=classpath:org/springframework/batch/core/schema-@@platform@@.sql # Path to the SQL file to use to initialize the database schema.
spring.batch.table-prefix= # Table prefix for all the batch meta-data tables. spring.batch.table-prefix= # Table prefix for all the batch meta-data tables.
# SPRING INTEGRATION ({sc-spring-boot-autoconfigure}/integration/IntegrationProperties.{sc-ext}[IntegrationProperties]) # SPRING INTEGRATION ({spring-boot-autoconfigure-module-code}/integration/IntegrationProperties.java[IntegrationProperties])
spring.integration.jdbc.initialize-schema=embedded # Database schema initialization mode. spring.integration.jdbc.initialize-schema=embedded # Database schema initialization mode.
spring.integration.jdbc.schema=classpath:org/springframework/integration/jdbc/schema-@@platform@@.sql # Path to the SQL file to use to initialize the database schema. spring.integration.jdbc.schema=classpath:org/springframework/integration/jdbc/schema-@@platform@@.sql # Path to the SQL file to use to initialize the database schema.
# JMS ({sc-spring-boot-autoconfigure}/jms/JmsProperties.{sc-ext}[JmsProperties]) # JMS ({spring-boot-autoconfigure-module-code}/jms/JmsProperties.java[JmsProperties])
spring.jms.cache.consumers=false # Whether to cache message consumers. spring.jms.cache.consumers=false # Whether to cache message consumers.
spring.jms.cache.enabled=true # Whether to cache sessions. spring.jms.cache.enabled=true # Whether to cache sessions.
spring.jms.cache.producers=true # Whether to cache message producers. spring.jms.cache.producers=true # Whether to cache message producers.
@ -1024,7 +1024,7 @@ Rather, pick only the properties that you need.
spring.jms.template.receive-timeout= # Timeout to use for receive calls. spring.jms.template.receive-timeout= # Timeout to use for receive calls.
spring.jms.template.time-to-live= # Time-to-live of a message when sending. Enables QoS (Quality of Service) when set. spring.jms.template.time-to-live= # Time-to-live of a message when sending. Enables QoS (Quality of Service) when set.
# APACHE KAFKA ({sc-spring-boot-autoconfigure}/kafka/KafkaProperties.{sc-ext}[KafkaProperties]) # APACHE KAFKA ({spring-boot-autoconfigure-module-code}/kafka/KafkaProperties.java[KafkaProperties])
spring.kafka.admin.client-id= # ID to pass to the server when making requests. Used for server-side logging. spring.kafka.admin.client-id= # ID to pass to the server when making requests. Used for server-side logging.
spring.kafka.admin.fail-fast=false # Whether to fail fast if the broker is not available on startup. spring.kafka.admin.fail-fast=false # Whether to fail fast if the broker is not available on startup.
spring.kafka.admin.properties.*= # Additional admin-specific properties used to configure the client. spring.kafka.admin.properties.*= # Additional admin-specific properties used to configure the client.
@ -1120,7 +1120,7 @@ Rather, pick only the properties that you need.
spring.kafka.streams.state-dir= # Directory location for the state store. spring.kafka.streams.state-dir= # Directory location for the state store.
spring.kafka.template.default-topic= # Default topic to which messages are sent. spring.kafka.template.default-topic= # Default topic to which messages are sent.
# RABBIT ({sc-spring-boot-autoconfigure}/amqp/RabbitProperties.{sc-ext}[RabbitProperties]) # RABBIT ({spring-boot-autoconfigure-module-code}/amqp/RabbitProperties.java[RabbitProperties])
spring.rabbitmq.addresses= # Comma-separated list of addresses to which the client should connect. spring.rabbitmq.addresses= # Comma-separated list of addresses to which the client should connect.
spring.rabbitmq.cache.channel.checkout-timeout= # Duration to wait to obtain a channel if the cache size has been reached. spring.rabbitmq.cache.channel.checkout-timeout= # Duration to wait to obtain a channel if the cache size has been reached.
spring.rabbitmq.cache.channel.size= # Number of channels to retain in the cache. spring.rabbitmq.cache.channel.size= # Number of channels to retain in the cache.
@ -1192,7 +1192,7 @@ Rather, pick only the properties that you need.
# ACTUATOR PROPERTIES # ACTUATOR PROPERTIES
# ---------------------------------------- # ----------------------------------------
# MANAGEMENT HTTP SERVER ({sc-spring-boot-actuator-autoconfigure}/web/server/ManagementServerProperties.{sc-ext}[ManagementServerProperties]) # MANAGEMENT HTTP SERVER ({spring-boot-actuator-autoconfigure-module-code}/web/server/ManagementServerProperties.java[ManagementServerProperties])
management.server.add-application-context-header=false # Add the "X-Application-Context" HTTP header in each response. management.server.add-application-context-header=false # Add the "X-Application-Context" HTTP header in each response.
management.server.address= # Network address to which the management endpoints should bind. Requires a custom management.server.port. management.server.address= # Network address to which the management endpoints should bind. Requires a custom management.server.port.
management.server.port= # Management endpoint HTTP port (uses the same port as the application by default). Configure a different port to use management-specific SSL. management.server.port= # Management endpoint HTTP port (uses the same port as the application by default). Configure a different port to use management-specific SSL.
@ -1220,19 +1220,19 @@ Rather, pick only the properties that you need.
# ENDPOINTS GENERAL CONFIGURATION # ENDPOINTS GENERAL CONFIGURATION
management.endpoints.enabled-by-default= # Whether to enable or disable all endpoints by default. management.endpoints.enabled-by-default= # Whether to enable or disable all endpoints by default.
# ENDPOINTS JMX CONFIGURATION ({sc-spring-boot-actuator-autoconfigure}/endpoint/jmx/JmxEndpointProperties.{sc-ext}[JmxEndpointProperties]) # ENDPOINTS JMX CONFIGURATION ({spring-boot-actuator-autoconfigure-module-code}/endpoint/jmx/JmxEndpointProperties.java[JmxEndpointProperties])
management.endpoints.jmx.domain=org.springframework.boot # Endpoints JMX domain name. Fallback to 'spring.jmx.default-domain' if set. management.endpoints.jmx.domain=org.springframework.boot # Endpoints JMX domain name. Fallback to 'spring.jmx.default-domain' if set.
management.endpoints.jmx.exposure.include=* # Endpoint IDs that should be included or '*' for all. management.endpoints.jmx.exposure.include=* # Endpoint IDs that should be included or '*' for all.
management.endpoints.jmx.exposure.exclude= # Endpoint IDs that should be excluded or '*' for all. management.endpoints.jmx.exposure.exclude= # Endpoint IDs that should be excluded or '*' for all.
management.endpoints.jmx.static-names= # Additional static properties to append to all ObjectNames of MBeans representing Endpoints. management.endpoints.jmx.static-names= # Additional static properties to append to all ObjectNames of MBeans representing Endpoints.
# ENDPOINTS WEB CONFIGURATION ({sc-spring-boot-actuator-autoconfigure}/endpoint/web/WebEndpointProperties.{sc-ext}[WebEndpointProperties]) # ENDPOINTS WEB CONFIGURATION ({spring-boot-actuator-autoconfigure-module-code}/endpoint/web/WebEndpointProperties.java[WebEndpointProperties])
management.endpoints.web.exposure.include=health,info # Endpoint IDs that should be included or '*' for all. management.endpoints.web.exposure.include=health,info # Endpoint IDs that should be included or '*' for all.
management.endpoints.web.exposure.exclude= # Endpoint IDs that should be excluded or '*' for all. management.endpoints.web.exposure.exclude= # Endpoint IDs that should be excluded or '*' for all.
management.endpoints.web.base-path=/actuator # Base path for Web endpoints. Relative to server.servlet.context-path or management.server.servlet.context-path if management.server.port is configured. management.endpoints.web.base-path=/actuator # Base path for Web endpoints. Relative to server.servlet.context-path or management.server.servlet.context-path if management.server.port is configured.
management.endpoints.web.path-mapping= # Mapping between endpoint IDs and the path that should expose them. management.endpoints.web.path-mapping= # Mapping between endpoint IDs and the path that should expose them.
# ENDPOINTS CORS CONFIGURATION ({sc-spring-boot-actuator-autoconfigure}/endpoint/web/CorsEndpointProperties.{sc-ext}[CorsEndpointProperties]) # ENDPOINTS CORS CONFIGURATION ({spring-boot-actuator-autoconfigure-module-code}/endpoint/web/CorsEndpointProperties.java[CorsEndpointProperties])
management.endpoints.web.cors.allow-credentials= # Whether credentials are supported. When not set, credentials are not supported. management.endpoints.web.cors.allow-credentials= # Whether credentials are supported. When not set, credentials are not supported.
management.endpoints.web.cors.allowed-headers= # Comma-separated list of headers to allow in a request. '*' allows all headers. management.endpoints.web.cors.allowed-headers= # Comma-separated list of headers to allow in a request. '*' allows all headers.
management.endpoints.web.cors.allowed-methods= # Comma-separated list of methods to allow. '*' allows all methods. When not set, defaults to GET. management.endpoints.web.cors.allowed-methods= # Comma-separated list of methods to allow. '*' allows all methods. When not set, defaults to GET.
@ -1240,99 +1240,99 @@ Rather, pick only the properties that you need.
management.endpoints.web.cors.exposed-headers= # Comma-separated list of headers to include in a response. management.endpoints.web.cors.exposed-headers= # Comma-separated list of headers to include in a response.
management.endpoints.web.cors.max-age=1800s # How long the response from a pre-flight request can be cached by clients. If a duration suffix is not specified, seconds will be used. management.endpoints.web.cors.max-age=1800s # How long the response from a pre-flight request can be cached by clients. If a duration suffix is not specified, seconds will be used.
# AUDIT EVENTS ENDPOINT ({sc-spring-boot-actuator}/audit/AuditEventsEndpoint.{sc-ext}[AuditEventsEndpoint]) # AUDIT EVENTS ENDPOINT ({spring-boot-actuator-module-code}/audit/AuditEventsEndpoint.java[AuditEventsEndpoint])
management.endpoint.auditevents.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.auditevents.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.auditevents.enabled=true # Whether to enable the auditevents endpoint. management.endpoint.auditevents.enabled=true # Whether to enable the auditevents endpoint.
# BEANS ENDPOINT ({sc-spring-boot-actuator}/beans/BeansEndpoint.{sc-ext}[BeansEndpoint]) # BEANS ENDPOINT ({spring-boot-actuator-module-code}/beans/BeansEndpoint.java[BeansEndpoint])
management.endpoint.beans.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.beans.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.beans.enabled=true # Whether to enable the beans endpoint. management.endpoint.beans.enabled=true # Whether to enable the beans endpoint.
# CACHES ENDPOINT ({sc-spring-boot-actuator}/cache/CachesEndpoint.{sc-ext}[CachesEndpoint]) # CACHES ENDPOINT ({spring-boot-actuator-module-code}/cache/CachesEndpoint.java[CachesEndpoint])
management.endpoint.caches.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.caches.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.caches.enabled=true # Whether to enable the caches endpoint. management.endpoint.caches.enabled=true # Whether to enable the caches endpoint.
# CONDITIONS REPORT ENDPOINT ({sc-spring-boot-actuator-autoconfigure}/condition/ConditionsReportEndpoint.{sc-ext}[ConditionsReportEndpoint]) # CONDITIONS REPORT ENDPOINT ({spring-boot-actuator-autoconfigure-module-code}/condition/ConditionsReportEndpoint.java[ConditionsReportEndpoint])
management.endpoint.conditions.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.conditions.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.conditions.enabled=true # Whether to enable the conditions endpoint. management.endpoint.conditions.enabled=true # Whether to enable the conditions endpoint.
# CONFIGURATION PROPERTIES REPORT ENDPOINT ({sc-spring-boot-actuator}/context/properties/ConfigurationPropertiesReportEndpoint.{sc-ext}[ConfigurationPropertiesReportEndpoint], {sc-spring-boot-actuator-autoconfigure}/context/properties/ConfigurationPropertiesReportEndpointProperties.{sc-ext}[ConfigurationPropertiesReportEndpointProperties]) # CONFIGURATION PROPERTIES REPORT ENDPOINT ({spring-boot-actuator-module-code}/context/properties/ConfigurationPropertiesReportEndpoint.java[ConfigurationPropertiesReportEndpoint], {spring-boot-actuator-autoconfigure-module-code}/context/properties/ConfigurationPropertiesReportEndpointProperties.java[ConfigurationPropertiesReportEndpointProperties])
management.endpoint.configprops.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.configprops.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.configprops.enabled=true # Whether to enable the configprops endpoint. management.endpoint.configprops.enabled=true # Whether to enable the configprops endpoint.
management.endpoint.configprops.keys-to-sanitize=password,secret,key,token,.*credentials.*,vcap_services,sun.java.command # Keys that should be sanitized. Keys can be simple strings that the property ends with or regular expressions. management.endpoint.configprops.keys-to-sanitize=password,secret,key,token,.*credentials.*,vcap_services,sun.java.command # Keys that should be sanitized. Keys can be simple strings that the property ends with or regular expressions.
# ENVIRONMENT ENDPOINT ({sc-spring-boot-actuator}/env/EnvironmentEndpoint.{sc-ext}[EnvironmentEndpoint], {sc-spring-boot-actuator-autoconfigure}/env/EnvironmentEndpointProperties.{sc-ext}[EnvironmentEndpointProperties]) # ENVIRONMENT ENDPOINT ({spring-boot-actuator-module-code}/env/EnvironmentEndpoint.java[EnvironmentEndpoint], {spring-boot-actuator-autoconfigure-module-code}/env/EnvironmentEndpointProperties.java[EnvironmentEndpointProperties])
management.endpoint.env.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.env.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.env.enabled=true # Whether to enable the env endpoint. management.endpoint.env.enabled=true # Whether to enable the env endpoint.
management.endpoint.env.keys-to-sanitize=password,secret,key,token,.*credentials.*,vcap_services,sun.java.command # Keys that should be sanitized. Keys can be simple strings that the property ends with or regular expressions. management.endpoint.env.keys-to-sanitize=password,secret,key,token,.*credentials.*,vcap_services,sun.java.command # Keys that should be sanitized. Keys can be simple strings that the property ends with or regular expressions.
# FLYWAY ENDPOINT ({sc-spring-boot-actuator}/flyway/FlywayEndpoint.{sc-ext}[FlywayEndpoint]) # FLYWAY ENDPOINT ({spring-boot-actuator-module-code}/flyway/FlywayEndpoint.java[FlywayEndpoint])
management.endpoint.flyway.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.flyway.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.flyway.enabled=true # Whether to enable the flyway endpoint. management.endpoint.flyway.enabled=true # Whether to enable the flyway endpoint.
# HEALTH ENDPOINT ({sc-spring-boot-actuator}/health/HealthEndpoint.{sc-ext}[HealthEndpoint], {sc-spring-boot-actuator-autoconfigure}/health/HealthEndpointProperties.{sc-ext}[HealthEndpointProperties]) # HEALTH ENDPOINT ({spring-boot-actuator-module-code}/health/HealthEndpoint.java[HealthEndpoint], {spring-boot-actuator-autoconfigure-module-code}/health/HealthEndpointProperties.java[HealthEndpointProperties])
management.endpoint.health.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.health.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.health.enabled=true # Whether to enable the health endpoint. management.endpoint.health.enabled=true # Whether to enable the health endpoint.
management.endpoint.health.roles= # Roles used to determine whether or not a user is authorized to be shown details. When empty, all authenticated users are authorized. management.endpoint.health.roles= # Roles used to determine whether or not a user is authorized to be shown details. When empty, all authenticated users are authorized.
management.endpoint.health.show-details=never # When to show full health details. management.endpoint.health.show-details=never # When to show full health details.
# HEAP DUMP ENDPOINT ({sc-spring-boot-actuator}/management/HeapDumpWebEndpoint.{sc-ext}[HeapDumpWebEndpoint]) # HEAP DUMP ENDPOINT ({spring-boot-actuator-module-code}/management/HeapDumpWebEndpoint.java[HeapDumpWebEndpoint])
management.endpoint.heapdump.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.heapdump.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.heapdump.enabled=true # Whether to enable the heapdump endpoint. management.endpoint.heapdump.enabled=true # Whether to enable the heapdump endpoint.
# HTTP TRACE ENDPOINT ({sc-spring-boot-actuator}/trace/http/HttpTraceEndpoint.{sc-ext}[HttpTraceEndpoint]) # HTTP TRACE ENDPOINT ({spring-boot-actuator-module-code}/trace/http/HttpTraceEndpoint.java[HttpTraceEndpoint])
management.endpoint.httptrace.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.httptrace.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.httptrace.enabled=true # Whether to enable the httptrace endpoint. management.endpoint.httptrace.enabled=true # Whether to enable the httptrace endpoint.
# INFO ENDPOINT ({sc-spring-boot-actuator}/info/InfoEndpoint.{sc-ext}[InfoEndpoint]) # INFO ENDPOINT ({spring-boot-actuator-module-code}/info/InfoEndpoint.java[InfoEndpoint])
info= # Arbitrary properties to add to the info endpoint. info= # Arbitrary properties to add to the info endpoint.
management.endpoint.info.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.info.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.info.enabled=true # Whether to enable the info endpoint. management.endpoint.info.enabled=true # Whether to enable the info endpoint.
# INTEGRATION GRAPH ENDPOINT ({sc-spring-boot-actuator}/integration/IntegrationGraphEndpoint.{sc-ext}[IntegrationGraphEndpoint]) # INTEGRATION GRAPH ENDPOINT ({spring-boot-actuator-module-code}/integration/IntegrationGraphEndpoint.java[IntegrationGraphEndpoint])
management.endpoint.integrationgraph.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.integrationgraph.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.integrationgraph.enabled=true # Whether to enable the integrationgraph endpoint. management.endpoint.integrationgraph.enabled=true # Whether to enable the integrationgraph endpoint.
# JOLOKIA ENDPOINT ({sc-spring-boot-actuator-autoconfigure}/jolokia/JolokiaProperties.{sc-ext}[JolokiaProperties]) # JOLOKIA ENDPOINT ({spring-boot-actuator-autoconfigure-module-code}/jolokia/JolokiaProperties.java[JolokiaProperties])
management.endpoint.jolokia.config.*= # Jolokia settings. Refer to the documentation of Jolokia for more details. management.endpoint.jolokia.config.*= # Jolokia settings. Refer to the documentation of Jolokia for more details.
management.endpoint.jolokia.enabled=true # Whether to enable the jolokia endpoint. management.endpoint.jolokia.enabled=true # Whether to enable the jolokia endpoint.
# LIQUIBASE ENDPOINT ({sc-spring-boot-actuator}/liquibase/LiquibaseEndpoint.{sc-ext}[LiquibaseEndpoint]) # LIQUIBASE ENDPOINT ({spring-boot-actuator-module-code}/liquibase/LiquibaseEndpoint.java[LiquibaseEndpoint])
management.endpoint.liquibase.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.liquibase.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.liquibase.enabled=true # Whether to enable the liquibase endpoint. management.endpoint.liquibase.enabled=true # Whether to enable the liquibase endpoint.
# LOG FILE ENDPOINT ({sc-spring-boot-actuator}/logging/LogFileWebEndpoint.{sc-ext}[LogFileWebEndpoint], {sc-spring-boot-actuator-autoconfigure}/logging/LogFileWebEndpointProperties.{sc-ext}[LogFileWebEndpointProperties]) # LOG FILE ENDPOINT ({spring-boot-actuator-module-code}/logging/LogFileWebEndpoint.java[LogFileWebEndpoint], {spring-boot-actuator-autoconfigure-module-code}/logging/LogFileWebEndpointProperties.java[LogFileWebEndpointProperties])
management.endpoint.logfile.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.logfile.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.logfile.enabled=true # Whether to enable the logfile endpoint. management.endpoint.logfile.enabled=true # Whether to enable the logfile endpoint.
management.endpoint.logfile.external-file= # External Logfile to be accessed. Can be used if the logfile is written by output redirect and not by the logging system itself. management.endpoint.logfile.external-file= # External Logfile to be accessed. Can be used if the logfile is written by output redirect and not by the logging system itself.
# LOGGERS ENDPOINT ({sc-spring-boot-actuator}/logging/LoggersEndpoint.{sc-ext}[LoggersEndpoint]) # LOGGERS ENDPOINT ({spring-boot-actuator-module-code}/logging/LoggersEndpoint.java[LoggersEndpoint])
management.endpoint.loggers.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.loggers.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.loggers.enabled=true # Whether to enable the loggers endpoint. management.endpoint.loggers.enabled=true # Whether to enable the loggers endpoint.
# REQUEST MAPPING ENDPOINT ({sc-spring-boot-actuator}/web/mappings/MappingsEndpoint.{sc-ext}[MappingsEndpoint]) # REQUEST MAPPING ENDPOINT ({spring-boot-actuator-module-code}/web/mappings/MappingsEndpoint.java[MappingsEndpoint])
management.endpoint.mappings.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.mappings.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.mappings.enabled=true # Whether to enable the mappings endpoint. management.endpoint.mappings.enabled=true # Whether to enable the mappings endpoint.
# METRICS ENDPOINT ({sc-spring-boot-actuator}/metrics/MetricsEndpoint.{sc-ext}[MetricsEndpoint]) # METRICS ENDPOINT ({spring-boot-actuator-module-code}/metrics/MetricsEndpoint.java[MetricsEndpoint])
management.endpoint.metrics.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.metrics.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.metrics.enabled=true # Whether to enable the metrics endpoint. management.endpoint.metrics.enabled=true # Whether to enable the metrics endpoint.
# PROMETHEUS ENDPOINT ({sc-spring-boot-actuator}/metrics/export/prometheus/PrometheusScrapeEndpoint.{sc-ext}[PrometheusScrapeEndpoint]) # PROMETHEUS ENDPOINT ({spring-boot-actuator-module-code}/metrics/export/prometheus/PrometheusScrapeEndpoint.java[PrometheusScrapeEndpoint])
management.endpoint.prometheus.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.prometheus.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.prometheus.enabled=true # Whether to enable the prometheus endpoint. management.endpoint.prometheus.enabled=true # Whether to enable the prometheus endpoint.
# SCHEDULED TASKS ENDPOINT ({sc-spring-boot-actuator}/scheduling/ScheduledTasksEndpoint.{sc-ext}[ScheduledTasksEndpoint]) # SCHEDULED TASKS ENDPOINT ({spring-boot-actuator-module-code}/scheduling/ScheduledTasksEndpoint.java[ScheduledTasksEndpoint])
management.endpoint.scheduledtasks.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.scheduledtasks.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.scheduledtasks.enabled=true # Whether to enable the scheduledtasks endpoint. management.endpoint.scheduledtasks.enabled=true # Whether to enable the scheduledtasks endpoint.
# SESSIONS ENDPOINT ({sc-spring-boot-actuator}/session/SessionsEndpoint.{sc-ext}[SessionsEndpoint]) # SESSIONS ENDPOINT ({spring-boot-actuator-module-code}/session/SessionsEndpoint.java[SessionsEndpoint])
management.endpoint.sessions.enabled=true # Whether to enable the sessions endpoint. management.endpoint.sessions.enabled=true # Whether to enable the sessions endpoint.
# SHUTDOWN ENDPOINT ({sc-spring-boot-actuator}/context/ShutdownEndpoint.{sc-ext}[ShutdownEndpoint]) # SHUTDOWN ENDPOINT ({spring-boot-actuator-module-code}/context/ShutdownEndpoint.java[ShutdownEndpoint])
management.endpoint.shutdown.enabled=false # Whether to enable the shutdown endpoint. management.endpoint.shutdown.enabled=false # Whether to enable the shutdown endpoint.
# THREAD DUMP ENDPOINT ({sc-spring-boot-actuator}/management/ThreadDumpEndpoint.{sc-ext}[ThreadDumpEndpoint]) # THREAD DUMP ENDPOINT ({spring-boot-actuator-module-code}/management/ThreadDumpEndpoint.java[ThreadDumpEndpoint])
management.endpoint.threaddump.cache.time-to-live=0ms # Maximum time that a response can be cached. management.endpoint.threaddump.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.threaddump.enabled=true # Whether to enable the threaddump endpoint. management.endpoint.threaddump.enabled=true # Whether to enable the threaddump endpoint.
@ -1359,11 +1359,11 @@ Rather, pick only the properties that you need.
management.health.status.http-mapping= # Mapping of health statuses to HTTP status codes. By default, registered health statuses map to sensible defaults (for example, UP maps to 200). management.health.status.http-mapping= # Mapping of health statuses to HTTP status codes. By default, registered health statuses map to sensible defaults (for example, UP maps to 200).
management.health.status.order=DOWN,OUT_OF_SERVICE,UP,UNKNOWN # Comma-separated list of health statuses in order of severity. management.health.status.order=DOWN,OUT_OF_SERVICE,UP,UNKNOWN # Comma-separated list of health statuses in order of severity.
# HTTP TRACING ({sc-spring-boot-actuator-autoconfigure}/trace/http/HttpTraceProperties.{sc-ext}[HttpTraceProperties]) # HTTP TRACING ({spring-boot-actuator-autoconfigure-module-code}/trace/http/HttpTraceProperties.java[HttpTraceProperties])
management.trace.http.enabled=true # Whether to enable HTTP request-response tracing. management.trace.http.enabled=true # Whether to enable HTTP request-response tracing.
management.trace.http.include=request-headers,response-headers,cookies,errors # Items to be included in the trace. management.trace.http.include=request-headers,response-headers,cookies,errors # Items to be included in the trace.
# INFO CONTRIBUTORS ({sc-spring-boot-actuator-autoconfigure}/info/InfoContributorProperties.{sc-ext}[InfoContributorProperties]) # INFO CONTRIBUTORS ({spring-boot-actuator-autoconfigure-module-code}/info/InfoContributorProperties.java[InfoContributorProperties])
management.info.build.enabled=true # Whether to enable build info. management.info.build.enabled=true # Whether to enable build info.
management.info.defaults.enabled=true # Whether to enable default info contributors. management.info.defaults.enabled=true # Whether to enable default info contributors.
management.info.env.enabled=true # Whether to enable environment info. management.info.env.enabled=true # Whether to enable environment info.
@ -1549,7 +1549,7 @@ Rather, pick only the properties that you need.
# DEVTOOLS PROPERTIES # DEVTOOLS PROPERTIES
# ---------------------------------------- # ----------------------------------------
# DEVTOOLS ({sc-spring-boot-devtools}/autoconfigure/DevToolsProperties.{sc-ext}[DevToolsProperties]) # DEVTOOLS ({spring-boot-devtools-module-code}/autoconfigure/DevToolsProperties.java[DevToolsProperties])
spring.devtools.add-properties=true # Whether to enable development property defaults. spring.devtools.add-properties=true # Whether to enable development property defaults.
spring.devtools.livereload.enabled=true # Whether to enable a livereload.com-compatible server. spring.devtools.livereload.enabled=true # Whether to enable a livereload.com-compatible server.
spring.devtools.livereload.port=35729 # Server port. spring.devtools.livereload.port=35729 # Server port.
@ -1562,7 +1562,7 @@ Rather, pick only the properties that you need.
spring.devtools.restart.quiet-period=400ms # Amount of quiet time required without any classpath changes before a restart is triggered. spring.devtools.restart.quiet-period=400ms # Amount of quiet time required without any classpath changes before a restart is triggered.
spring.devtools.restart.trigger-file= # Name of a specific file that, when changed, triggers the restart check. If not specified, any classpath file change triggers the restart. spring.devtools.restart.trigger-file= # Name of a specific file that, when changed, triggers the restart check. If not specified, any classpath file change triggers the restart.
# REMOTE DEVTOOLS ({sc-spring-boot-devtools}/autoconfigure/RemoteDevToolsProperties.{sc-ext}[RemoteDevToolsProperties]) # REMOTE DEVTOOLS ({spring-boot-devtools-module-code}/autoconfigure/RemoteDevToolsProperties.java[RemoteDevToolsProperties])
spring.devtools.remote.context-path=/.~~spring-boot!~ # Context path used to handle the remote connection. spring.devtools.remote.context-path=/.~~spring-boot!~ # Context path used to handle the remote connection.
spring.devtools.remote.proxy.host= # The host of the proxy to use to connect to the remote application. spring.devtools.remote.proxy.host= # The host of the proxy to use to connect to the remote application.
spring.devtools.remote.proxy.port= # The port of the proxy to use to connect to the remote application. spring.devtools.remote.proxy.port= # The port of the proxy to use to connect to the remote application.

@ -12,10 +12,10 @@ If you are just getting started, you might want to read "`<<using-spring-boot.ad
[[build-tool-plugins-maven-plugin]] [[build-tool-plugins-maven-plugin]]
== Spring Boot Maven Plugin == Spring Boot Maven Plugin
The {spring-boot-maven-plugin-site}[Spring Boot Maven Plugin] provides Spring Boot support in Maven, letting you package executable jar or war archives and run an application "`in-place`". The {spring-boot-maven-plugin-docs}[Spring Boot Maven Plugin] provides Spring Boot support in Maven, letting you package executable jar or war archives and run an application "`in-place`".
To use it, you must use Maven 3.2 (or later). To use it, you must use Maven 3.2 (or later).
NOTE: See the {spring-boot-maven-plugin-site}[Spring Boot Maven Plugin Site] for complete plugin documentation. NOTE: See the {spring-boot-maven-plugin-docs}[Spring Boot Maven Plugin Site] for complete plugin documentation.
@ -154,7 +154,7 @@ To build a war file that is both executable and deployable into an external cont
TIP: See the "`<<howto-create-a-deployable-war-file>>`" section for more details on how to create a deployable war file. TIP: See the "`<<howto-create-a-deployable-war-file>>`" section for more details on how to create a deployable war file.
Advanced configuration options and examples are available in the {spring-boot-maven-plugin-site}[plugin info page]. Advanced configuration options and examples are available in the {spring-boot-maven-plugin-docs}[plugin info page].
@ -164,8 +164,8 @@ The Spring Boot Gradle Plugin provides Spring Boot support in Gradle, letting yo
It requires Gradle 4.4 or later. It requires Gradle 4.4 or later.
Please refer to the plugin's documentation to learn more: Please refer to the plugin's documentation to learn more:
* Reference ({spring-boot-gradle-plugin}/reference/html[HTML] and {spring-boot-gradle-plugin}/reference/pdf/spring-boot-gradle-plugin-reference.pdf[PDF]) * Reference ({spring-boot-gradle-plugin-docs}[HTML] and {spring-boot-gradle-plugin-pdfdocs}[PDF])
* {spring-boot-gradle-plugin}/api[API] * {spring-boot-gradle-plugin-api}[API]
@ -233,10 +233,10 @@ The following nested elements can be used with the task:
| Element | Description | Element | Description
| `resources` | `resources`
| One or more {ant-manual}/Types/resources.html#collection[Resource Collections] describing a set of {ant-manual}/Types/resources.html[Resources] that should be added to the content of the created +jar+ file. | One or more {ant-docs}/Types/resources.html#collection[Resource Collections] describing a set of {ant-docs}/Types/resources.html[Resources] that should be added to the content of the created +jar+ file.
| `lib` | `lib`
| One or more {ant-manual}/Types/resources.html#collection[Resource Collections] that should be added to the set of jar libraries that make up the runtime dependency classpath of the application. | One or more {ant-docs}/Types/resources.html#collection[Resource Collections] that should be added to the set of jar libraries that make up the runtime dependency classpath of the application.
|==== |====
@ -377,7 +377,7 @@ The following example shows a typical repackage implementation:
[[build-tool-plugins-whats-next]] [[build-tool-plugins-whats-next]]
== What to Read Next == What to Read Next
If you are interested in how the build tool plugins work, you can look at the {github-code}/spring-boot-project/spring-boot-tools[`spring-boot-tools`] module on GitHub. If you are interested in how the build tool plugins work, you can look at the {spring-boot-code}/spring-boot-project/spring-boot-tools[`spring-boot-tools`] module on GitHub.
More technical details of the executable jar format are covered in <<appendix-executable-jar-format.adoc#executable-jar,the appendix>>. More technical details of the executable jar format are covered in <<appendix-executable-jar-format.adoc#executable-jar,the appendix>>.
If you have specific build-related questions, you can check out the "`<<howto.adoc#howto, how-to>>`" guides. If you have specific build-related questions, you can check out the "`<<howto.adoc#howto, how-to>>`" guides.

@ -125,7 +125,7 @@ Environment variables do not always make for the easiest API, so Spring Boot aut
All Cloud Foundry properties are prefixed with `vcap`. All Cloud Foundry properties are prefixed with `vcap`.
You can use `vcap` properties to access application information (such as the public URL of the application) and service information (such as database credentials). You can use `vcap` properties to access application information (such as the public URL of the application) and service information (such as database credentials).
See the {dc-spring-boot}/cloud/CloudFoundryVcapEnvironmentPostProcessor.html['`CloudFoundryVcapEnvironmentPostProcessor`'] Javadoc for complete details. See the {spring-boot-module-api}/cloud/CloudFoundryVcapEnvironmentPostProcessor.html['`CloudFoundryVcapEnvironmentPostProcessor`'] Javadoc for complete details.
TIP: The https://cloud.spring.io/spring-cloud-connectors/[Spring Cloud Connectors] project is a better fit for tasks such as configuring a DataSource. TIP: The https://cloud.spring.io/spring-cloud-connectors/[Spring Cloud Connectors] project is a better fit for tasks such as configuring a DataSource.
Spring Boot includes auto-configuration support and a `spring-boot-starter-cloud-connectors` starter. Spring Boot includes auto-configuration support and a `spring-boot-starter-cloud-connectors` starter.
@ -587,7 +587,7 @@ It often makes sense to customize elements of the start script as it is written
For example, init.d scripts can provide a "`description`". For example, init.d scripts can provide a "`description`".
Since you know the description up front (and it need not change), you may as well provide it when the jar is generated. Since you know the description up front (and it need not change), you may as well provide it when the jar is generated.
To customize written elements, use the `embeddedLaunchScriptProperties` option of the Spring Boot Maven plugin or the {spring-boot-gradle-plugin-reference}/#packaging-executable-configuring-launch-script[`properties` property of the Spring Boot Gradle plugin's `launchScript`]. To customize written elements, use the `embeddedLaunchScriptProperties` option of the Spring Boot Maven plugin or the {spring-boot-gradle-plugin-docs}/#packaging-executable-configuring-launch-script[`properties` property of the Spring Boot Gradle plugin's `launchScript`].
The following property substitutions are supported with the default script: The following property substitutions are supported with the default script:

@ -17,7 +17,7 @@ The Spring Boot reference guide is available as:
* {spring-boot-docs}/pdf/spring-boot-reference.pdf[PDF] * {spring-boot-docs}/pdf/spring-boot-reference.pdf[PDF]
* {spring-boot-docs}/epub/spring-boot-reference.epub[EPUB] * {spring-boot-docs}/epub/spring-boot-reference.epub[EPUB]
The latest copy is available at {spring-boot-docs-current}. The latest copy is available at {spring-boot-current-docs}.
Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically. Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.
@ -38,7 +38,7 @@ If you have trouble with Spring Boot, we would like to help.
* Report bugs with Spring Boot at https://github.com/spring-projects/spring-boot/issues. * Report bugs with Spring Boot at https://github.com/spring-projects/spring-boot/issues.
NOTE: All of Spring Boot is open source, including the documentation. NOTE: All of Spring Boot is open source, including the documentation.
If you find problems with the docs or if you want to improve them, please {github-code}[get involved]. If you find problems with the docs or if you want to improve them, please {spring-boot-code}[get involved].

@ -32,7 +32,7 @@ Our primary goals are:
[[getting-started-system-requirements]] [[getting-started-system-requirements]]
== System Requirements == System Requirements
Spring Boot {spring-boot-version} requires https://www.java.com[Java 8] and is compatible up to Java 12 (included). Spring Boot {spring-boot-version} requires https://www.java.com[Java 8] and is compatible up to Java 12 (included).
{spring-reference}[Spring Framework {spring-framework-version}] or above is also required. {spring-framework-docs}[Spring Framework {spring-framework-version}] or above is also required.
Explicit build support is provided for the following build tools: Explicit build support is provided for the following build tools:
@ -195,10 +195,10 @@ Spring Boot provides a useful <<build-tool-plugins.adoc#build-tool-plugins-gradl
**** ****
The Gradle Wrapper provides a nice way of "`obtaining`" Gradle when you need to build a project. The Gradle Wrapper provides a nice way of "`obtaining`" Gradle when you need to build a project.
It is a small script and library that you commit alongside your code to bootstrap the build process. It is a small script and library that you commit alongside your code to bootstrap the build process.
See {gradle-user-guide}/gradle_wrapper.html for details. See {gradle-docs}/gradle_wrapper.html for details.
**** ****
More details on getting started with Spring Boot and Gradle can be found in the {spring-boot-gradle-plugin-reference}/#getting-started[Getting Started section] of the Gradle plugin's reference guide. More details on getting started with Spring Boot and Gradle can be found in the {spring-boot-gradle-plugin-docs}/#getting-started[Getting Started section] of the Gradle plugin's reference guide.
@ -413,7 +413,7 @@ If you need to solve a specific problem, check there first.
You can shortcut the steps below by going to https://start.spring.io and choosing the "Web" starter from the dependencies searcher. You can shortcut the steps below by going to https://start.spring.io and choosing the "Web" starter from the dependencies searcher.
Doing so generates a new project structure so that you can <<getting-started-first-application-code,start coding right away>>. Doing so generates a new project structure so that you can <<getting-started-first-application-code,start coding right away>>.
Check the {spring-initializr-reference}/#user-guide[Spring Initializr documentation] for more details. Check the {spring-initializr-docs}/#user-guide[Spring Initializr documentation] for more details.
==== ====
Before we begin, open a terminal and run the following commands to ensure that you have valid versions of Java and Maven installed: Before we begin, open a terminal and run the following commands to ensure that you have valid versions of Java and Maven installed:
@ -579,7 +579,7 @@ It tells Spring that any HTTP request with the `/` path should be mapped to the
The `@RestController` annotation tells Spring to render the resulting string directly back to the caller. The `@RestController` annotation tells Spring to render the resulting string directly back to the caller.
TIP: The `@RestController` and `@RequestMapping` annotations are Spring MVC annotations (they are not specific to Spring Boot). TIP: The `@RestController` and `@RequestMapping` annotations are Spring MVC annotations (they are not specific to Spring Boot).
See the {spring-reference}web.html#mvc[MVC section] in the Spring Reference Documentation for more details. See the {spring-framework-docs}web.html#mvc[MVC section] in the Spring Reference Documentation for more details.
@ -679,7 +679,7 @@ To do so, insert the following lines just below the `dependencies` section:
NOTE: The `spring-boot-starter-parent` POM includes `<executions>` configuration to bind the `repackage` goal. NOTE: The `spring-boot-starter-parent` POM includes `<executions>` configuration to bind the `repackage` goal.
If you do not use the parent POM, you need to declare this configuration yourself. If you do not use the parent POM, you need to declare this configuration yourself.
See the {spring-boot-maven-plugin-site}/usage.html[plugin documentation] for details. See the {spring-boot-maven-plugin-docs}/usage.html[plugin documentation] for details.
Save your `pom.xml` and run `mvn package` from the command line, as follows: Save your `pom.xml` and run `mvn package` from the command line, as follows:
@ -743,7 +743,7 @@ Hopefully, this section provided some of the Spring Boot basics and got you on y
If you are a task-oriented type of developer, you might want to jump over to https://spring.io and check out some of the https://spring.io/guides/[getting started] guides that solve specific "`How do I do that with Spring?`" problems. If you are a task-oriented type of developer, you might want to jump over to https://spring.io and check out some of the https://spring.io/guides/[getting started] guides that solve specific "`How do I do that with Spring?`" problems.
We also have Spring Boot-specific "`<<howto.adoc#howto, How-to>>`" reference documentation. We also have Spring Boot-specific "`<<howto.adoc#howto, How-to>>`" reference documentation.
The https://github.com/{github-repo}[Spring Boot repository] also has a {github-code}/spring-boot-samples[bunch of samples] you can run. The https://github.com/{github-repo}[Spring Boot repository] also has a {spring-boot-code}/spring-boot-samples[bunch of samples] you can run.
The samples are independent of the rest of the code (that is, you do not need to build the rest to run or use the samples). The samples are independent of the rest of the code (that is, you do not need to build the rest to run or use the samples).
Otherwise, the next logical step is to read _<<using-spring-boot.adoc#using-boot>>_. Otherwise, the next logical step is to read _<<using-spring-boot.adoc#using-boot>>_.

@ -10,7 +10,7 @@ If you have a specific problem that we do not cover here, you might want to chec
This is also a great place to ask new questions (please use the `spring-boot` tag). This is also a great place to ask new questions (please use the `spring-boot` tag).
We are also more than happy to extend this section. We are also more than happy to extend this section.
If you want to add a '`how-to`', send us a {github-code}[pull request]. If you want to add a '`how-to`', send us a {spring-boot-code}[pull request].
-- --
@ -23,7 +23,7 @@ This section includes topics relating directly to Spring Boot applications.
[[howto-failure-analyzer]] [[howto-failure-analyzer]]
=== Create Your Own FailureAnalyzer === Create Your Own FailureAnalyzer
{dc-spring-boot}/diagnostics/FailureAnalyzer.{dc-ext}[`FailureAnalyzer`] is a great way to intercept an exception on startup and turn it into a human-readable message, wrapped in a {dc-spring-boot}/diagnostics/FailureAnalysis.{dc-ext}[`FailureAnalysis`]. {spring-boot-module-api}/diagnostics/FailureAnalyzer.html[`FailureAnalyzer`] is a great way to intercept an exception on startup and turn it into a human-readable message, wrapped in a {spring-boot-module-api}/diagnostics/FailureAnalysis.html[`FailureAnalysis`].
Spring Boot provides such an analyzer for application-context-related exceptions, JSR-303 validations, and more. Spring Boot provides such an analyzer for application-context-related exceptions, JSR-303 validations, and more.
You can also create your own. You can also create your own.
@ -60,7 +60,7 @@ When reading the code, remember the following rules of thumb:
Pay special attention to the `+@Conditional*+` annotations to find out what features they enable and when. Pay special attention to the `+@Conditional*+` annotations to find out what features they enable and when.
Add `--debug` to the command line or a System property `-Ddebug` to get a log on the console of all the auto-configuration decisions that were made in your app. Add `--debug` to the command line or a System property `-Ddebug` to get a log on the console of all the auto-configuration decisions that were made in your app.
In a running application with actuator enabled, look at the `conditions` endpoint (`/actuator/conditions` or the JMX equivalent) for the same information. In a running application with actuator enabled, look at the `conditions` endpoint (`/actuator/conditions` or the JMX equivalent) for the same information.
* Look for classes that are `@ConfigurationProperties` (such as {sc-spring-boot-autoconfigure}/web/ServerProperties.{sc-ext}[`ServerProperties`]) and read from there the available external configuration options. * Look for classes that are `@ConfigurationProperties` (such as {spring-boot-autoconfigure-module-code}/web/ServerProperties.java[`ServerProperties`]) and read from there the available external configuration options.
The `@ConfigurationProperties` annotation has a `name` attribute that acts as a prefix to external properties. The `@ConfigurationProperties` annotation has a `name` attribute that acts as a prefix to external properties.
Thus, `ServerProperties` has `prefix="server"` and its configuration properties are `server.port`, `server.address`, and others. Thus, `ServerProperties` has `prefix="server"` and its configuration properties are `server.port`, `server.address`, and others.
In a running application with actuator enabled, look at the `configprops` endpoint. In a running application with actuator enabled, look at the `configprops` endpoint.
@ -157,7 +157,7 @@ NOTE: Only production configuration is filtered that way (in other words, no fil
TIP: If you enable the `addResources` flag, the `spring-boot:run` goal can add `src/main/resources` directly to the classpath (for hot reloading purposes). TIP: If you enable the `addResources` flag, the `spring-boot:run` goal can add `src/main/resources` directly to the classpath (for hot reloading purposes).
Doing so circumvents the resource filtering and this feature. Doing so circumvents the resource filtering and this feature.
Instead, you can use the `exec:java` goal or customize the plugin's configuration. Instead, you can use the `exec:java` goal or customize the plugin's configuration.
See the {spring-boot-maven-plugin-site}/usage.html[plugin usage page] for more details. See the {spring-boot-maven-plugin-docs}/usage.html[plugin usage page] for more details.
If you do not use the starter parent, you need to include the following element inside the `<build/>` element of your `pom.xml`: If you do not use the starter parent, you need to include the following element inside the `<build/>` element of your `pom.xml`:
@ -274,7 +274,7 @@ By default, if YAML is used, then files with the '`.yml`' extension are also add
Spring Boot logs the configuration files that are loaded at the `DEBUG` level and the candidates it has not found at `TRACE` level. Spring Boot logs the configuration files that are loaded at the `DEBUG` level and the candidates it has not found at `TRACE` level.
See {sc-spring-boot}/context/config/ConfigFileApplicationListener.{sc-ext}[`ConfigFileApplicationListener`] for more detail. See {spring-boot-module-code}/context/config/ConfigFileApplicationListener.java[`ConfigFileApplicationListener`] for more detail.
@ -489,7 +489,7 @@ Thanks to relaxed binding of `Environment` values, you can also use `SERVER_PORT
To switch off the HTTP endpoints completely but still create a `WebApplicationContext`, use `server.port=-1` (doing so is sometimes useful for testing). To switch off the HTTP endpoints completely but still create a `WebApplicationContext`, use `server.port=-1` (doing so is sometimes useful for testing).
For more details, see "`<<spring-boot-features.adoc#boot-features-customizing-embedded-containers>>`" in the '`Spring Boot Features`' section, or the {sc-spring-boot-autoconfigure}/web/ServerProperties.{sc-ext}[`ServerProperties`] source code. For more details, see "`<<spring-boot-features.adoc#boot-features-customizing-embedded-containers>>`" in the '`Spring Boot Features`' section, or the {spring-boot-autoconfigure-module-code}/web/ServerProperties.java[`ServerProperties`] source code.
@ -574,13 +574,13 @@ The following example shows setting SSL properties in `application.properties`:
server.ssl.key-password=another-secret server.ssl.key-password=another-secret
---- ----
See {sc-spring-boot}/web/server/Ssl.{sc-ext}[`Ssl`] for details of all of the supported properties. See {spring-boot-module-code}/web/server/Ssl.java[`Ssl`] for details of all of the supported properties.
Using configuration such as the preceding example means the application no longer supports a plain HTTP connector at port 8080. Using configuration such as the preceding example means the application no longer supports a plain HTTP connector at port 8080.
Spring Boot does not support the configuration of both an HTTP connector and an HTTPS connector through `application.properties`. Spring Boot does not support the configuration of both an HTTP connector and an HTTPS connector through `application.properties`.
If you want to have both, you need to configure one of them programmatically. If you want to have both, you need to configure one of them programmatically.
We recommend using `application.properties` to configure HTTPS, as the HTTP connector is the easier of the two to configure programmatically. We recommend using `application.properties` to configure HTTPS, as the HTTP connector is the easier of the two to configure programmatically.
See the{github-code}/spring-boot-samples/spring-boot-sample-tomcat-multi-connectors[`spring-boot-sample-tomcat-multi-connectors`] sample project for an example. See the{spring-boot-code}/spring-boot-samples/spring-boot-sample-tomcat-multi-connectors[`spring-boot-sample-tomcat-multi-connectors`] sample project for an example.
@ -648,7 +648,7 @@ Generally, you should first consider using one of the many available configurati
The `server.{asterisk}` namespace is quite useful here, and it includes namespaces like `server.tomcat.{asterisk}`, `server.jetty.{asterisk}` and others, for server-specific features. The `server.{asterisk}` namespace is quite useful here, and it includes namespaces like `server.tomcat.{asterisk}`, `server.jetty.{asterisk}` and others, for server-specific features.
See the list of <<common-application-properties>>. See the list of <<common-application-properties>>.
The previous sections covered already many common use cases, such as compression, SSL or HTTP/2. However, if a configuration key doesn't exist for your use case, you should then look at {dc-spring-boot}/web/server/WebServerFactoryCustomizer.html[`WebServerFactoryCustomizer`]. The previous sections covered already many common use cases, such as compression, SSL or HTTP/2. However, if a configuration key doesn't exist for your use case, you should then look at {spring-boot-module-api}/web/server/WebServerFactoryCustomizer.html[`WebServerFactoryCustomizer`].
You can declare such a component and get access to the server factory relevant to your choice: you should select the variant for the chosen Server (Tomcat, Jetty, Reactor Netty, Undertow) and the chosen web stack (Servlet or Reactive). You can declare such a component and get access to the server factory relevant to your choice: you should select the variant for the chosen Server (Tomcat, Jetty, Reactor Netty, Undertow) and the chosen web stack (Servlet or Reactive).
The example below is for Tomcat with the `spring-boot-starter-web` (Servlet stack): The example below is for Tomcat with the `spring-boot-starter-web` (Servlet stack):
@ -754,7 +754,7 @@ By default, `@ServletComponentScan` scans from the package of the annotated clas
=== Configure Access Logging === Configure Access Logging
Access logs can be configured for Tomcat, Undertow, and Jetty through their respective namespaces. Access logs can be configured for Tomcat, Undertow, and Jetty through their respective namespaces.
For instance, the following settings log access on Tomcat with a {tomcat-documentation}/config/valve.html#Access_Logging[custom pattern]. For instance, the following settings log access on Tomcat with a {tomcat-docs}/config/valve.html#Access_Logging[custom pattern].
[source,properties,indent=0,subs="verbatim,quotes,attributes"] [source,properties,indent=0,subs="verbatim,quotes,attributes"]
---- ----
@ -787,7 +787,7 @@ Finally, access logging for Jetty can also be configured as follows:
---- ----
By default, logs are redirected to `System.err`. By default, logs are redirected to `System.err`.
For more details, see {jetty-documentation}/configuring-jetty-request-logs.html[the Jetty documentation]. For more details, see {jetty-docs}/configuring-jetty-request-logs.html[the Jetty documentation].
@ -1065,7 +1065,7 @@ If you provide any `@Beans` of type `MappingJackson2HttpMessageConverter`, they
Also, a convenience bean of type `HttpMessageConverters` is provided (and is always available if you use the default MVC configuration). Also, a convenience bean of type `HttpMessageConverters` is provided (and is always available if you use the default MVC configuration).
It has some useful methods to access the default and user-enhanced message converters. It has some useful methods to access the default and user-enhanced message converters.
See the "`<<howto-customize-the-responsebody-rendering>>`" section and the {sc-spring-boot-autoconfigure}/web/servlet/WebMvcAutoConfiguration.{sc-ext}[`WebMvcAutoConfiguration`] source code for more details. See the "`<<howto-customize-the-responsebody-rendering>>`" section and the {spring-boot-autoconfigure-module-code}/web/servlet/WebMvcAutoConfiguration.java[`WebMvcAutoConfiguration`] source code for more details.
@ -1081,7 +1081,7 @@ As in normal MVC usage, any `WebMvcConfigurer` beans that you provide can also c
However, unlike with normal MVC, you can supply only additional converters that you need (because Spring Boot uses the same mechanism to contribute its defaults). However, unlike with normal MVC, you can supply only additional converters that you need (because Spring Boot uses the same mechanism to contribute its defaults).
Finally, if you opt out of the Spring Boot default MVC configuration by providing your own `@EnableWebMvc` configuration, you can take control completely and do everything manually by using `getMessageConverters` from `WebMvcConfigurationSupport`. Finally, if you opt out of the Spring Boot default MVC configuration by providing your own `@EnableWebMvc` configuration, you can take control completely and do everything manually by using `getMessageConverters` from `WebMvcConfigurationSupport`.
See the {sc-spring-boot-autoconfigure}/web/servlet/WebMvcAutoConfiguration.{sc-ext}[`WebMvcAutoConfiguration`] source code for more details. See the {spring-boot-autoconfigure-module-code}/web/servlet/WebMvcAutoConfiguration.java[`WebMvcAutoConfiguration`] source code for more details.
@ -1094,7 +1094,7 @@ For example, if you want to specify that files be unlimited, set the `spring.ser
The multipart support is helpful when you want to receive multipart encoded file data as a `@RequestParam`-annotated parameter of type `MultipartFile` in a Spring MVC controller handler method. The multipart support is helpful when you want to receive multipart encoded file data as a `@RequestParam`-annotated parameter of type `MultipartFile` in a Spring MVC controller handler method.
See the {sc-spring-boot-autoconfigure}/web/servlet/MultipartAutoConfiguration.{sc-ext}[`MultipartAutoConfiguration`] source for more details. See the {spring-boot-autoconfigure-module-code}/web/servlet/MultipartAutoConfiguration.java[`MultipartAutoConfiguration`] source for more details.
NOTE: It is recommended to use the container's built-in support for multipart uploads rather than introducing an additional dependency such as Apache Commons File Upload. NOTE: It is recommended to use the container's built-in support for multipart uploads rather than introducing an additional dependency such as Apache Commons File Upload.
@ -1162,10 +1162,10 @@ If you add your own, you have to be aware of the order and in which position you
For more detail, see the following sections: For more detail, see the following sections:
* {sc-spring-boot-autoconfigure}/web/servlet/WebMvcAutoConfiguration.{sc-ext}[`WebMvcAutoConfiguration`] * {spring-boot-autoconfigure-module-code}/web/servlet/WebMvcAutoConfiguration.java[`WebMvcAutoConfiguration`]
* {sc-spring-boot-autoconfigure}/thymeleaf/ThymeleafAutoConfiguration.{sc-ext}[`ThymeleafAutoConfiguration`] * {spring-boot-autoconfigure-module-code}/thymeleaf/ThymeleafAutoConfiguration.java[`ThymeleafAutoConfiguration`]
* {sc-spring-boot-autoconfigure}/freemarker/FreeMarkerAutoConfiguration.{sc-ext}[`FreeMarkerAutoConfiguration`] * {spring-boot-autoconfigure-module-code}/freemarker/FreeMarkerAutoConfiguration.java[`FreeMarkerAutoConfiguration`]
* {sc-spring-boot-autoconfigure}/groovy/template/GroovyTemplateAutoConfiguration.{sc-ext}[`GroovyTemplateAutoConfiguration`] * {spring-boot-autoconfigure-module-code}/groovy/template/GroovyTemplateAutoConfiguration.java[`GroovyTemplateAutoConfiguration`]
@ -1370,7 +1370,7 @@ And the following example shows one way to set up the starters in Gradle:
---- ----
NOTE: The Log4j starters gather together the dependencies for common logging requirements (such as having Tomcat use `java.util.logging` but configuring the output using Log4j 2). NOTE: The Log4j starters gather together the dependencies for common logging requirements (such as having Tomcat use `java.util.logging` but configuring the output using Log4j 2).
See the {github-code}/spring-boot-samples/spring-boot-sample-actuator-log4j2[Actuator Log4j 2] samples for more detail and to see it in action. See the {spring-boot-code}/spring-boot-samples/spring-boot-sample-actuator-log4j2[Actuator Log4j 2] samples for more detail and to see it in action.
NOTE: To ensure that debug logging performed using `java.util.logging` is routed into Log4j 2, configure its https://logging.apache.org/log4j/2.0/log4j-jul/index.html[JDK logging adapter] by setting the `java.util.logging.manager` system property to `org.apache.logging.log4j.jul.LogManager`. NOTE: To ensure that debug logging performed using `java.util.logging` is routed into Log4j 2, configure its https://logging.apache.org/log4j/2.0/log4j-jul/index.html[JDK logging adapter] by setting the `java.util.logging.manager` system property to `org.apache.logging.log4j.jul.LogManager`.
@ -1506,7 +1506,7 @@ This example uses a more generic `configuration` sub namespace as the example do
NOTE: Because your custom configuration chooses to go with Hikari, `app.datasource.type` has no effect. NOTE: Because your custom configuration chooses to go with Hikari, `app.datasource.type` has no effect.
In practice, the builder is initialized with whatever value you might set there and then overridden by the call to `.type()`. In practice, the builder is initialized with whatever value you might set there and then overridden by the call to `.type()`.
See "`<<spring-boot-features.adoc#boot-features-configure-datasource>>`" in the "`Spring Boot features`" section and the {sc-spring-boot-autoconfigure}/jdbc/DataSourceAutoConfiguration.{sc-ext}[`DataSourceAutoConfiguration`] class for more details. See "`<<spring-boot-features.adoc#boot-features-configure-datasource>>`" in the "`Spring Boot features`" section and the {spring-boot-autoconfigure-module-code}/jdbc/DataSourceAutoConfiguration.java[`DataSourceAutoConfiguration`] class for more details.
@ -1558,7 +1558,7 @@ Spring Boot handles all of that for you, as long as those `@Repositories` are in
For many applications, all you need is to put the right Spring Data dependencies on your classpath and create some repository interfaces to handle your `@Entity` objects. For many applications, all you need is to put the right Spring Data dependencies on your classpath and create some repository interfaces to handle your `@Entity` objects.
There is a `spring-boot-starter-data-jpa` for JPA, spring-boot-starter-data-mongodb` for Mongodb, etc. There is a `spring-boot-starter-data-jpa` for JPA, spring-boot-starter-data-mongodb` for Mongodb, etc.
Examples are in the {github-code}/spring-boot-samples/spring-boot-sample-data-jpa[JPA sample] and the {github-code}/spring-boot-samples/spring-boot-sample-data-mongodb[Mongodb sample]. Examples are in the {spring-boot-code}/spring-boot-samples/spring-boot-sample-data-jpa[JPA sample] and the {spring-boot-code}/spring-boot-samples/spring-boot-sample-data-mongodb[Mongodb sample].
Spring Boot tries to guess the location of your `@Repository` definitions, based on the `@EnableAutoConfiguration` it finds. Spring Boot tries to guess the location of your `@Repository` definitions, based on the `@EnableAutoConfiguration` it finds.
To get more control, use the `@EnableJpaRepositories` annotation (from Spring Data JPA). To get more control, use the `@EnableJpaRepositories` annotation (from Spring Data JPA).
@ -1618,7 +1618,7 @@ This takes precedence to anything that is applied by the auto-configuration.
[[howto-configure-hibernate-naming-strategy]] [[howto-configure-hibernate-naming-strategy]]
=== Configure Hibernate Naming Strategy === Configure Hibernate Naming Strategy
Hibernate uses {hibernate-documentation}#naming[two different naming strategies] to map names from the object model to the corresponding database names. Hibernate uses {hibernate-docs}#naming[two different naming strategies] to map names from the object model to the corresponding database names.
The fully qualified class name of the physical and the implicit strategy implementations can be configured by setting the `spring.jpa.hibernate.naming.physical-strategy` and `spring.jpa.hibernate.naming.implicit-strategy` properties, respectively. The fully qualified class name of the physical and the implicit strategy implementations can be configured by setting the `spring.jpa.hibernate.naming.physical-strategy` and `spring.jpa.hibernate.naming.implicit-strategy` properties, respectively.
Alternatively, if `ImplicitNamingStrategy` or `PhysicalNamingStrategy` beans are available in the application context, Hibernate will be automatically configured to use them. Alternatively, if `ImplicitNamingStrategy` or `PhysicalNamingStrategy` beans are available in the application context, Hibernate will be automatically configured to use them.
@ -1645,13 +1645,13 @@ Alternatively, you can configure the following bean:
} }
---- ----
See {sc-spring-boot-autoconfigure}/orm/jpa/HibernateJpaAutoConfiguration.{sc-ext}[`HibernateJpaAutoConfiguration`] and {sc-spring-boot-autoconfigure}/orm/jpa/JpaBaseConfiguration.{sc-ext}[`JpaBaseConfiguration`] for more details. See {spring-boot-autoconfigure-module-code}/orm/jpa/HibernateJpaAutoConfiguration.java[`HibernateJpaAutoConfiguration`] and {spring-boot-autoconfigure-module-code}/orm/jpa/JpaBaseConfiguration.java[`JpaBaseConfiguration`] for more details.
[[howto-configure-hibernate-second-level-caching]] [[howto-configure-hibernate-second-level-caching]]
=== Configure Hibernate Second-Level Caching === Configure Hibernate Second-Level Caching
Hibernate {hibernate-documentation}#caching[second-level cache] can be configured for a range of cache providers. Hibernate {hibernate-docs}#caching[second-level cache] can be configured for a range of cache providers.
Rather than configuring Hibernate to lookup the cache provider again, it is better to provide the one that is available in the context whenever possible. Rather than configuring Hibernate to lookup the cache provider again, it is better to provide the one that is available in the context whenever possible.
If you're using JCache, this is pretty easy. First, make sure that `org.hibernate:hibernate-jcache` is available on the classpath. If you're using JCache, this is pretty easy. First, make sure that `org.hibernate:hibernate-jcache` is available on the classpath.
@ -1664,7 +1664,7 @@ include::{code-examples}/jpa/HibernateSecondLevelCacheExample.java[tag=configura
This customizer will configure Hibernate to use the same `CacheManager` as the one that the application uses. This customizer will configure Hibernate to use the same `CacheManager` as the one that the application uses.
It is also possible to use separate `CacheManager` instances. It is also possible to use separate `CacheManager` instances.
For details, refer to {hibernate-documentation}#caching-provider-jcache[the Hibernate user guide]. For details, refer to {hibernate-docs}#caching-provider-jcache[the Hibernate user guide].
@ -1747,7 +1747,7 @@ If you use Spring Data, you need to configure `@EnableJpaRepositories` according
Spring Boot will not search for or use a `META-INF/persistence.xml` by default. Spring Boot will not search for or use a `META-INF/persistence.xml` by default.
If you prefer to use a traditional `persistence.xml`, you need to define your own `@Bean` of type `LocalEntityManagerFactoryBean` (with an ID of '`entityManagerFactory`') and set the persistence unit name there. If you prefer to use a traditional `persistence.xml`, you need to define your own `@Bean` of type `LocalEntityManagerFactoryBean` (with an ID of '`entityManagerFactory`') and set the persistence unit name there.
See {sc-spring-boot-autoconfigure}/orm/jpa/JpaBaseConfiguration.{sc-ext}[`JpaBaseConfiguration`] for the default settings. See {spring-boot-autoconfigure-module-code}/orm/jpa/JpaBaseConfiguration.java[`JpaBaseConfiguration`] for the default settings.
@ -1777,8 +1777,8 @@ Note that if you are using Spring Data REST, you must use the properties in the
Spring Data REST can expose the `Repository` implementations as REST endpoints for you, Spring Data REST can expose the `Repository` implementations as REST endpoints for you,
provided Spring MVC has been enabled for the application. provided Spring MVC has been enabled for the application.
Spring Boot exposes a set of useful properties (from the `spring.data.rest` namespace) that customize the {spring-data-rest-javadoc}/core/config/RepositoryRestConfiguration.{dc-ext}[`RepositoryRestConfiguration`]. Spring Boot exposes a set of useful properties (from the `spring.data.rest` namespace) that customize the {spring-data-rest-api}/core/config/RepositoryRestConfiguration.html[`RepositoryRestConfiguration`].
If you need to provide additional customization, you should use a {spring-data-rest-javadoc}/webmvc/config/RepositoryRestConfigurer.{dc-ext}[`RepositoryRestConfigurer`] bean. If you need to provide additional customization, you should use a {spring-data-rest-api}/webmvc/config/RepositoryRestConfigurer.html[`RepositoryRestConfigurer`] bean.
NOTE: If you do not specify any order on your custom `RepositoryRestConfigurer`, it runs after the one Spring Boot uses internally. NOTE: If you do not specify any order on your custom `RepositoryRestConfigurer`, it runs after the one Spring Boot uses internally.
If you need to specify an order, make sure it is higher than 0. If you need to specify an order, make sure it is higher than 0.
@ -1804,7 +1804,7 @@ include::{code-examples}/elasticsearch/HibernateSearchElasticsearchExample.java[
[[howto-configure-jOOQ-with-multiple-datasources]] [[howto-configure-jOOQ-with-multiple-datasources]]
=== Configure jOOQ with Two DataSources === Configure jOOQ with Two DataSources
If you need to use jOOQ with multiple data sources, you should create your own `DSLContext` for each one. If you need to use jOOQ with multiple data sources, you should create your own `DSLContext` for each one.
Refer to {sc-spring-boot-autoconfigure}/jooq/JooqAutoConfiguration.{sc-ext}[JooqAutoConfiguration] for more details. Refer to {spring-boot-autoconfigure-module-code}/jooq/JooqAutoConfiguration.java[JooqAutoConfiguration] for more details.
TIP: In particular, `JooqExceptionTranslator` and `SpringTransactionProvider` can be reused to provide similar features to what the auto-configuration does with a single `DataSource`. TIP: In particular, `JooqExceptionTranslator` and `SpringTransactionProvider` can be reused to provide similar features to what the auto-configuration does with a single `DataSource`.
@ -1921,13 +1921,13 @@ Assume the following:
---- ----
Rather than using `db/migration`, the preceding configuration sets the folder to use according to the type of the database (such as `db/migration/mysql` for MySQL). Rather than using `db/migration`, the preceding configuration sets the folder to use according to the type of the database (such as `db/migration/mysql` for MySQL).
The list of supported databases is available in {sc-spring-boot}/jdbc/DatabaseDriver.{sc-ext}[`DatabaseDriver`]. The list of supported databases is available in {spring-boot-module-code}/jdbc/DatabaseDriver.java[`DatabaseDriver`].
{sc-spring-boot-autoconfigure}/flyway/FlywayProperties.{sc-ext}[`FlywayProperties`] provides most of Flyway's settings and a small set of additional properties that can be used to disable the migrations or switch off the location checking. {spring-boot-autoconfigure-module-code}/flyway/FlywayProperties.java[`FlywayProperties`] provides most of Flyway's settings and a small set of additional properties that can be used to disable the migrations or switch off the location checking.
If you need more control over the configuration, consider registering a `FlywayConfigurationCustomizer` bean. If you need more control over the configuration, consider registering a `FlywayConfigurationCustomizer` bean.
Spring Boot calls `Flyway.migrate()` to perform the database migration. Spring Boot calls `Flyway.migrate()` to perform the database migration.
If you would like more control, provide a `@Bean` that implements {sc-spring-boot-autoconfigure}/flyway/FlywayMigrationStrategy.{sc-ext}[`FlywayMigrationStrategy`]. If you would like more control, provide a `@Bean` that implements {spring-boot-autoconfigure-module-code}/flyway/FlywayMigrationStrategy.java[`FlywayMigrationStrategy`].
Flyway supports SQL and Java https://flywaydb.org/documentation/callbacks.html[callbacks]. Flyway supports SQL and Java https://flywaydb.org/documentation/callbacks.html[callbacks].
To use SQL-based callbacks, place the callback scripts in the `classpath:db/migration` folder. To use SQL-based callbacks, place the callback scripts in the `classpath:db/migration` folder.
@ -1943,7 +1943,7 @@ Alternatively, you can use Flyway's native `DataSource` by setting `spring.flywa
Setting either `spring.flyway.url` or `spring.flyway.user` is sufficient to cause Flyway to use its own `DataSource`. Setting either `spring.flyway.url` or `spring.flyway.user` is sufficient to cause Flyway to use its own `DataSource`.
If any of the three properties has not be set, the value of its equivalent `spring.datasource` property will be used. If any of the three properties has not be set, the value of its equivalent `spring.datasource` property will be used.
There is a {github-code}/spring-boot-samples/spring-boot-sample-flyway[Flyway sample] so that you can see how to set things up. There is a {spring-boot-code}/spring-boot-samples/spring-boot-sample-flyway[Flyway sample] so that you can see how to set things up.
You can also use Flyway to provide data for specific scenarios. You can also use Flyway to provide data for specific scenarios.
For example, you can place test-specific migrations in `src/test/resources` and they are run only when your application starts for testing. For example, you can place test-specific migrations in `src/test/resources` and they are run only when your application starts for testing.
@ -1973,9 +1973,9 @@ Alternatively, you can use Liquibase's native `DataSource` by setting `spring.li
Setting either `spring.liquibase.url` or `spring.liquibase.user` is sufficient to cause Liquibase to use its own `DataSource`. Setting either `spring.liquibase.url` or `spring.liquibase.user` is sufficient to cause Liquibase to use its own `DataSource`.
If any of the three properties has not be set, the value of its equivalent `spring.datasource` property will be used. If any of the three properties has not be set, the value of its equivalent `spring.datasource` property will be used.
See {sc-spring-boot-autoconfigure}/liquibase/LiquibaseProperties.{sc-ext}[`LiquibaseProperties`] for details about available settings such as contexts, the default schema, and others. See {spring-boot-autoconfigure-module-code}/liquibase/LiquibaseProperties.java[`LiquibaseProperties`] for details about available settings such as contexts, the default schema, and others.
There is a {github-code}/spring-boot-samples/spring-boot-sample-liquibase[Liquibase sample] so that you can see how to set things up. There is a {spring-boot-code}/spring-boot-samples/spring-boot-sample-liquibase[Liquibase sample] so that you can see how to set things up.
@ -2017,7 +2017,7 @@ This section answers questions that arise from using Spring Batch with Spring Bo
NOTE: By default, batch applications require a `DataSource` to store job details. NOTE: By default, batch applications require a `DataSource` to store job details.
If you want to deviate from that, you need to implement `BatchConfigurer`. If you want to deviate from that, you need to implement `BatchConfigurer`.
See {spring-batch-javadoc}/core/configuration/annotation/EnableBatchProcessing.html[The Javadoc of `@EnableBatchProcessing`] for more details. See {spring-batch-api}/core/configuration/annotation/EnableBatchProcessing.html[The Javadoc of `@EnableBatchProcessing`] for more details.
For more about Spring Batch, see the https://projects.spring.io/spring-batch/[Spring Batch project page]. For more about Spring Batch, see the https://projects.spring.io/spring-batch/[Spring Batch project page].
@ -2027,7 +2027,7 @@ For more about Spring Batch, see the https://projects.spring.io/spring-batch/[Sp
=== Execute Spring Batch Jobs on Startup === Execute Spring Batch Jobs on Startup
Spring Batch auto-configuration is enabled by adding `@EnableBatchProcessing` (from Spring Batch) somewhere in your context. Spring Batch auto-configuration is enabled by adding `@EnableBatchProcessing` (from Spring Batch) somewhere in your context.
By default, it executes *all* `Jobs` in the application context on startup (see {sc-spring-boot-autoconfigure}/batch/JobLauncherCommandLineRunner.{sc-ext}[JobLauncherCommandLineRunner] for details). By default, it executes *all* `Jobs` in the application context on startup (see {spring-boot-autoconfigure-module-code}/batch/JobLauncherCommandLineRunner.java[JobLauncherCommandLineRunner] for details).
You can narrow down to a specific job or jobs by specifying `spring.batch.job.names` (which takes a comma-separated list of job name patterns). You can narrow down to a specific job or jobs by specifying `spring.batch.job.names` (which takes a comma-separated list of job name patterns).
[TIP] [TIP]
@ -2039,7 +2039,7 @@ Unlike command line option arguments that <<spring-boot-features.adoc#boot-featu
If the application context includes a `JobRegistry`, the jobs in `spring.batch.job.names` are looked up in the registry instead of being autowired from the context. If the application context includes a `JobRegistry`, the jobs in `spring.batch.job.names` are looked up in the registry instead of being autowired from the context.
This is a common pattern with more complex systems, where multiple jobs are defined in child contexts and registered centrally. This is a common pattern with more complex systems, where multiple jobs are defined in child contexts and registered centrally.
See {sc-spring-boot-autoconfigure}/batch/BatchAutoConfiguration.{sc-ext}[BatchAutoConfiguration] and https://github.com/spring-projects/spring-batch/blob/master/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java[@EnableBatchProcessing] for more details. See {spring-boot-autoconfigure-module-code}/batch/BatchAutoConfiguration.java[BatchAutoConfiguration] and https://github.com/spring-projects/spring-batch/blob/master/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java[@EnableBatchProcessing] for more details.
@ -2055,7 +2055,7 @@ In a standalone application, the Actuator HTTP port defaults to the same as the
To make the application listen on a different port, set the external property: `management.server.port`. To make the application listen on a different port, set the external property: `management.server.port`.
To listen on a completely different network address (such as when you have an internal network for management and an external one for user applications), you can also set `management.server.address` to a valid IP address to which the server is able to bind. To listen on a completely different network address (such as when you have an internal network for management and an external one for user applications), you can also set `management.server.address` to a valid IP address to which the server is able to bind.
For more detail, see the {sc-spring-boot-actuator-autoconfigure}/web/server/ManagementServerProperties.{sc-ext}[`ManagementServerProperties`] source code and "`<<production-ready-features.adoc#production-ready-customizing-management-server-port>>`" in the "`Production-ready features`" section. For more detail, see the {spring-boot-actuator-autoconfigure-module-code}/web/server/ManagementServerProperties.java[`ManagementServerProperties`] source code and "`<<production-ready-features.adoc#production-ready-customizing-management-server-port>>`" in the "`Production-ready features`" section.
@ -2072,7 +2072,7 @@ For example, if you use Thymeleaf, you can add an `error.html` template.
If you use FreeMarker, you can add an `error.ftl` template. If you use FreeMarker, you can add an `error.ftl` template.
In general, you need a `View` that resolves with a name of `error` or a `@Controller` that handles the `/error` path. In general, you need a `View` that resolves with a name of `error` or a `@Controller` that handles the `/error` path.
Unless you replaced some of the default configuration, you should find a `BeanNameViewResolver` in your `ApplicationContext`, so a `@Bean` named `error` would be a simple way of doing that. Unless you replaced some of the default configuration, you should find a `BeanNameViewResolver` in your `ApplicationContext`, so a `@Bean` named `error` would be a simple way of doing that.
See {sc-spring-boot-autoconfigure}/web/servlet/error/ErrorMvcAutoConfiguration.{sc-ext}[`ErrorMvcAutoConfiguration`] for more options. See {spring-boot-autoconfigure-module-code}/web/servlet/error/ErrorMvcAutoConfiguration.java[`ErrorMvcAutoConfiguration`] for more options.
See also the section on "`<<boot-features-error-handling, Error Handling>>`" for details of how to register handlers in the servlet container. See also the section on "`<<boot-features-error-handling, Error Handling>>`" for details of how to register handlers in the servlet container.
@ -2178,21 +2178,21 @@ If you use the `spring-boot-devtools` module, these properties are <<using-sprin
[[howto-reload-thymeleaf-content]] [[howto-reload-thymeleaf-content]]
==== Thymeleaf Templates ==== Thymeleaf Templates
If you use Thymeleaf, set `spring.thymeleaf.cache` to `false`. If you use Thymeleaf, set `spring.thymeleaf.cache` to `false`.
See {sc-spring-boot-autoconfigure}/thymeleaf/ThymeleafAutoConfiguration.{sc-ext}[`ThymeleafAutoConfiguration`] for other Thymeleaf customization options. See {spring-boot-autoconfigure-module-code}/thymeleaf/ThymeleafAutoConfiguration.java[`ThymeleafAutoConfiguration`] for other Thymeleaf customization options.
[[howto-reload-freemarker-content]] [[howto-reload-freemarker-content]]
==== FreeMarker Templates ==== FreeMarker Templates
If you use FreeMarker, set `spring.freemarker.cache` to `false`. If you use FreeMarker, set `spring.freemarker.cache` to `false`.
See {sc-spring-boot-autoconfigure}/freemarker/FreeMarkerAutoConfiguration.{sc-ext}[`FreeMarkerAutoConfiguration`] for other FreeMarker customization options. See {spring-boot-autoconfigure-module-code}/freemarker/FreeMarkerAutoConfiguration.java[`FreeMarkerAutoConfiguration`] for other FreeMarker customization options.
[[howto-reload-groovy-template-content]] [[howto-reload-groovy-template-content]]
==== Groovy Templates ==== Groovy Templates
If you use Groovy templates, set `spring.groovy.template.cache` to `false`. If you use Groovy templates, set `spring.groovy.template.cache` to `false`.
See {sc-spring-boot-autoconfigure}/groovy/template/GroovyTemplateAutoConfiguration.{sc-ext}[`GroovyTemplateAutoConfiguration`] for other Groovy customization options. See {spring-boot-autoconfigure-module-code}/groovy/template/GroovyTemplateAutoConfiguration.java[`GroovyTemplateAutoConfiguration`] for other Groovy customization options.
@ -2248,7 +2248,7 @@ To generate build information with Maven, add an execution for the `build-info`
</build> </build>
---- ----
TIP: See the {spring-boot-maven-plugin-site}[Spring Boot Maven Plugin documentation] for more details. TIP: See the {spring-boot-maven-plugin-docs}[Spring Boot Maven Plugin documentation] for more details.
The following example does the same with Gradle: The following example does the same with Gradle:
@ -2259,7 +2259,7 @@ The following example does the same with Gradle:
} }
---- ----
TIP: See the {spring-boot-gradle-plugin-reference}/#integrating-with-actuator-build-info[Spring Boot Gradle Plugin documentation] for more details. TIP: See the {spring-boot-gradle-plugin-docs}/#integrating-with-actuator-build-info[Spring Boot Gradle Plugin documentation] for more details.
@ -2300,7 +2300,7 @@ Using this format lets the time be parsed into a `Date` and its format, when ser
[[howto-customize-dependency-versions]] [[howto-customize-dependency-versions]]
=== Customize Dependency Versions === Customize Dependency Versions
If you use a Maven build that inherits directly or indirectly from `spring-boot-dependencies` (for instance, `spring-boot-starter-parent`) but you want to override a specific third-party dependency, you can add appropriate `<properties>` elements. If you use a Maven build that inherits directly or indirectly from `spring-boot-dependencies` (for instance, `spring-boot-starter-parent`) but you want to override a specific third-party dependency, you can add appropriate `<properties>` elements.
Browse the {github-code}/spring-boot-project/spring-boot-dependencies/pom.xml[`spring-boot-dependencies`] POM for a complete list of properties. Browse the {spring-boot-code}/spring-boot-project/spring-boot-dependencies/pom.xml[`spring-boot-dependencies`] POM for a complete list of properties.
For example, to pick a different `slf4j` version, you would add the following property: For example, to pick a different `slf4j` version, you would add the following property:
[source,xml,indent=0,subs="verbatim,quotes,attributes"] [source,xml,indent=0,subs="verbatim,quotes,attributes"]
@ -2316,7 +2316,7 @@ If you have added `spring-boot-dependencies` in your own `dependencyManagement`
WARNING: Each Spring Boot release is designed and tested against this specific set of third-party dependencies. WARNING: Each Spring Boot release is designed and tested against this specific set of third-party dependencies.
Overriding versions may cause compatibility issues. Overriding versions may cause compatibility issues.
To override dependency versions in Gradle, see {spring-boot-gradle-plugin-reference}/#managing-dependencies-customizing[this section] of the Gradle plugin's documentation. To override dependency versions in Gradle, see {spring-boot-gradle-plugin-docs}/#managing-dependencies-customizing[this section] of the Gradle plugin's documentation.
@ -2360,7 +2360,7 @@ However, you must additionally add an `<executions>` section, as follows:
</build> </build>
---- ----
See the {spring-boot-maven-plugin-site}/usage.html[plugin documentation] for full usage details. See the {spring-boot-maven-plugin-docs}/usage.html[plugin documentation] for full usage details.
@ -2472,9 +2472,9 @@ In Maven, the executable jar must be the main artifact and you can add a classif
[[howto-remote-debug-maven-run]] [[howto-remote-debug-maven-run]]
=== Remote Debug a Spring Boot Application Started with Maven === Remote Debug a Spring Boot Application Started with Maven
To attach a remote debugger to a Spring Boot application that was started with Maven, you can use the `jvmArguments` property of the {spring-boot-maven-plugin-site}[maven plugin]. To attach a remote debugger to a Spring Boot application that was started with Maven, you can use the `jvmArguments` property of the {spring-boot-maven-plugin-docs}[maven plugin].
See {spring-boot-maven-plugin-site}/examples/run-debug.html[this example] for more details. See {spring-boot-maven-plugin-docs}/examples/run-debug.html[this example] for more details.
@ -2519,7 +2519,7 @@ The following example shows how to build an executable archive with Ant:
</target> </target>
---- ----
The {github-code}/spring-boot-samples/spring-boot-sample-ant[Ant Sample] has a `build.xml` file with a `manual` task that should work if you run it with the following command: The {spring-boot-code}/spring-boot-samples/spring-boot-sample-ant[Ant Sample] has a `build.xml` file with a `manual` task that should work if you run it with the following command:
[indent=0,subs="verbatim,quotes,attributes"] [indent=0,subs="verbatim,quotes,attributes"]
---- ----
@ -2618,7 +2618,7 @@ Among other limitations, `compileOnly` dependencies are not on the test classpat
If you use the <<build-tool-plugins.adoc#build-tool-plugins, Spring Boot build tools>>, marking the embedded servlet container dependency as provided produces an executable war file with the provided dependencies packaged in a `lib-provided` directory. If you use the <<build-tool-plugins.adoc#build-tool-plugins, Spring Boot build tools>>, marking the embedded servlet container dependency as provided produces an executable war file with the provided dependencies packaged in a `lib-provided` directory.
This means that, in addition to being deployable to a servlet container, you can also run your application by using `java -jar` on the command line. This means that, in addition to being deployable to a servlet container, you can also run your application by using `java -jar` on the command line.
TIP: Take a look at Spring Boot's sample applications for a {github-code}/spring-boot-samples/spring-boot-sample-traditional/pom.xml[Maven-based example] of the previously described configuration. TIP: Take a look at Spring Boot's sample applications for a {spring-boot-code}/spring-boot-samples/spring-boot-sample-traditional/pom.xml[Maven-based example] of the previously described configuration.

@ -7,75 +7,84 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson;
:numbered: :numbered:
:icons: font :icons: font
:hide-uri-scheme: :hide-uri-scheme:
:spring-boot-repo: snapshot :spring-boot-repo: snapshot
:github-tag: master :github-tag: master
:spring-boot-docs-version: current :spring-boot-version: current
:spring-boot-docs: https://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/reference
:spring-boot-docs-current: https://docs.spring.io/spring-boot/docs/current/reference
:github-repo: spring-projects/spring-boot :github-repo: spring-projects/spring-boot
:github-raw: https://raw.github.com/{github-repo}/{github-tag} :github-raw: https://raw.github.com/{github-repo}/{github-tag}
:github-code: https://github.com/{github-repo}/tree/{github-tag}
:github-issues: https://github.com/{github-repo}/issues/ :github-issues: https://github.com/{github-repo}/issues/
:github-wiki: https://github.com/{github-repo}/wiki :github-wiki: https://github.com/{github-repo}/wiki
:github-master-code: https://github.com/{github-repo}/tree/master
:sc-ext: java
:sc-spring-boot: {github-code}/spring-boot-project/spring-boot/src/main/java/org/springframework/boot
:sc-spring-boot-autoconfigure: {github-code}/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure
:sc-spring-boot-actuator: {github-code}/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate
:sc-spring-boot-actuator-autoconfigure: {github-code}/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure
:sc-spring-boot-cli: {github-code}/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli
:sc-spring-boot-devtools: {github-code}/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools
:sc-spring-boot-test: {github-code}/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test
:sc-spring-boot-test-autoconfigure: {github-code}/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure
:dc-ext: html
:dc-root: https://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/api
:dc-spring-boot: {dc-root}/org/springframework/boot
:dc-spring-boot-autoconfigure: {dc-root}/org/springframework/boot/autoconfigure
:dc-spring-boot-actuator: {dc-root}/org/springframework/boot/actuate
:dc-spring-boot-test: {dc-root}/org/springframework/boot/test
:dc-spring-boot-test-autoconfigure: {dc-root}/org/springframework/boot/test/autoconfigure
:dependency-management-plugin: https://github.com/spring-gradle-plugins/dependency-management-plugin
:dependency-management-plugin-documentation: {dependency-management-plugin}/blob/master/README.md
:java-javadoc: https://docs.oracle.com/javase/8/docs/api/
:spring-boot-actuator-api: https://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/actuator-api/
:spring-boot-maven-plugin-site: https://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/maven-plugin
:spring-boot-gradle-plugin: https://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/gradle-plugin
:spring-boot-gradle-plugin-reference: https://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/gradle-plugin/reference/html
:spring-reference: https://docs.spring.io/spring/docs/{spring-docs-version}/spring-framework-reference/
:spring-initializr-reference: https://docs.spring.io/initializr/docs/current/reference/html
:spring-rest-docs: https://projects.spring.io/spring-restdocs/
:spring-integration: https://projects.spring.io/spring-integration/
:spring-integration-reference: https://docs.spring.io/spring-integration/docs/{spring-integration-docs-version}/reference/html
:spring-session: https://projects.spring.io/spring-session/
:spring-framework: https://projects.spring.io/spring-framework/
:spring-security: https://projects.spring.io/spring-security/
:spring-data-jpa: https://projects.spring.io/spring-data-jpa/
:spring-security-reference: https://docs.spring.io/spring-security/site/docs/{spring-security-docs-version}/reference/htmlsingle
:spring-security-oauth2-reference: https://projects.spring.io/spring-security-oauth/docs/oauth2.html
:spring-webservices-reference: https://docs.spring.io/spring-ws/docs/{spring-webservices-docs-version}/reference/
:spring-javadoc: https://docs.spring.io/spring/docs/{spring-docs-version}/javadoc-api/org/springframework
:spring-amqp-javadoc: https://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp
:spring-batch-javadoc: https://docs.spring.io/spring-batch/apidocs/org/springframework/batch
:spring-data-javadoc: https://docs.spring.io/spring-data/jpa/docs/current/api/org/springframework/data/jpa
:spring-data-commons-javadoc: https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data
:spring-data-mongo-javadoc: https://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb
:spring-data-mongo: https://projects.spring.io/spring-data-mongodb/
:spring-data: https://projects.spring.io/spring-data/
:spring-data-rest-javadoc: https://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest
:gradle-userguide: https://www.gradle.org/docs/current/userguide
:ant-manual: https://ant.apache.org/manual
:code-examples: ../java/org/springframework/boot/docs :code-examples: ../java/org/springframework/boot/docs
:test-examples: ../../test/java/org/springframework/boot/docs :test-examples: ../../test/java/org/springframework/boot/docs
:gradle-user-guide: https://docs.gradle.org/4.2.1/userguide
:hibernate-documentation: https://docs.jboss.org/hibernate/orm/5.3/userguide/html_single/Hibernate_User_Guide.html :spring-boot-code: https://github.com/{github-repo}/tree/{github-tag}
:jetty-documentation: https://www.eclipse.org/jetty/documentation/9.4.x :spring-boot-api: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/api
:jooq-manual: https://www.jooq.org/doc/{jooq-version}/manual-single-page :spring-boot-docs: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/reference
:micrometer-concepts-documentation: https://micrometer.io/docs/concepts :spring-boot-master-code: https://github.com/{github-repo}/tree/master
:micrometer-registry-documentation: https://micrometer.io/docs/registry :spring-boot-current-docs: https://docs.spring.io/spring-boot/docs/current/reference
:tomcat-documentation: https://tomcat.apache.org/tomcat-8.5-doc :spring-boot-actuator-restapi: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/actuator-api/
:kotlin-documentation: https://kotlinlang.org/docs/reference/ :spring-boot-maven-plugin-docs: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/maven-plugin
:junit5-documentation: https://junit.org/junit5/docs/current/user-guide :spring-boot-gradle-plugin-docs: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/gradle-plugin/reference/html
// ====================================================================================== :spring-boot-gradle-plugin-pdfdocs: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/gradle-plugin/reference/pdf/spring-boot-gradle-plugin-reference.pdf
:spring-boot-gradle-plugin-api: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/gradle-plugin/reference/html
:spring-boot-module-code: {spring-boot-code}/spring-boot-project/spring-boot/src/main/java/org/springframework/boot
:spring-boot-module-api: {spring-boot-api}/org/springframework/boot
:spring-boot-autoconfigure-module-code: {spring-boot-code}/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure
:spring-boot-autoconfigure-module-api: {spring-boot-api}/org/springframework/boot/autoconfigure
:spring-boot-actuator-module-code: {spring-boot-code}/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate
:spring-boot-actuator-module-api: {spring-boot-api}/org/springframework/boot/actuate
:spring-boot-actuator-autoconfigure-module-code: {spring-boot-code}/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure
:spring-boot-actuator-autoconfigure-module-api: : {spring-boot-api}/org/springframework/boot/actuate/autoconfigure
:spring-boot-cli-module-code: {spring-boot-code}/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli
:spring-boot-cli-module-api: {spring-boot-api}/org/springframework/boot/cli
:spring-boot-devtools-module-code: {spring-boot-code}/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools
:spring-boot-devtools-module-api: {spring-boot-api}/org/springframework/boot/devtools
:spring-boot-test-module-code: {spring-boot-code}/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test
:spring-boot-test-module-api: {spring-boot-api}/org/springframework/boot/test
:spring-boot-test-autoconfigure-module-code: {spring-boot-code}/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure
:spring-boot-test-autoconfigure-module-api: {spring-boot-api}/org/springframework/boot/test/autoconfigure
:spring-amqp-api: https://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp
:spring-batch-api: https://docs.spring.io/spring-batch/apidocs/org/springframework/batch
:spring-data: https://projects.spring.io/spring-data/
:spring-data-commons-api: https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data
:spring-data-jpa: https://projects.spring.io/spring-data-jpa/
:spring-data-jpa-api: https://docs.spring.io/spring-data/jpa/docs/current/api/org/springframework/data/jpa
:spring-data-mongodb: https://projects.spring.io/spring-data-mongodb/
:spring-data-mongodb-api: https://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb
:spring-data-rest-api: https://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest
:spring-framework: https://projects.spring.io/spring-framework/
:spring-framework-api: https://docs.spring.io/spring/docs/{spring-framework-version}/javadoc-api/org/springframework
:spring-framework-docs: https://docs.spring.io/spring/docs/{spring-framework-version}/spring-framework-reference/
:spring-initializr-docs: https://docs.spring.io/initializr/docs/current/reference/html
:spring-integration: https://projects.spring.io/spring-integration/
:spring-integration-docs: https://docs.spring.io/spring-integration/docs/{spring-integration-version}/reference/html
:spring-restdocs: https://projects.spring.io/spring-restdocs/
:spring-security: https://projects.spring.io/spring-security/
:spring-security-docs: https://docs.spring.io/spring-security/site/docs/{spring-security-version}/reference/htmlsingle
:spring-security-oauth2-docs: https://projects.spring.io/spring-security-oauth/docs/oauth2.html
:spring-session: https://projects.spring.io/spring-session/
:spring-webservices-docs: https://docs.spring.io/spring-ws/docs/{spring-webservices-version}/reference/
:ant-docs: https://ant.apache.org/manual
:dependency-management-plugin-code: https://github.com/spring-gradle-plugins/dependency-management-plugin
:gradle-docs: https://docs.gradle.org/4.2.1/userguide
:hibernate-docs: https://docs.jboss.org/hibernate/orm/5.3/userguide/html_single/Hibernate_User_Guide.html
:java-api: https://docs.oracle.com/javase/8/docs/api/
:jetty-docs: https://www.eclipse.org/jetty/documentation/9.4.x
:jooq-docs: https://www.jooq.org/doc/{jooq-version}/manual-single-page
:junit5-docs: https://junit.org/junit5/docs/current/user-guide
:kotlin-docs: https://kotlinlang.org/docs/reference/
:micrometer-docs: https://micrometer.io/docs
:micrometer-concepts-docs: {micrometer-docs}/concepts
:micrometer-registry-docs: {micrometer-docs}/registry
:tomcat-docs: https://tomcat.apache.org/tomcat-9.0-doc
include::documentation-overview.adoc[] include::documentation-overview.adoc[]
include::getting-started.adoc[] include::getting-started.adoc[]
@ -87,5 +96,3 @@ include::spring-boot-cli.adoc[]
include::build-tool-plugins.adoc[] include::build-tool-plugins.adoc[]
include::howto.adoc[] include::howto.adoc[]
include::appendix.adoc[] include::appendix.adoc[]
// ======================================================================================

@ -12,7 +12,7 @@ Auditing, health, and metrics gathering can also be automatically applied to you
[[production-ready-enabling]] [[production-ready-enabling]]
== Enabling Production-ready Features == Enabling Production-ready Features
The {github-code}/spring-boot-project/spring-boot-actuator[`spring-boot-actuator`] module provides all of Spring Boot's production-ready features. The {spring-boot-code}/spring-boot-project/spring-boot-actuator[`spring-boot-actuator`] module provides all of Spring Boot's production-ready features.
The simplest way to enable the features is to add a dependency to the `spring-boot-starter-actuator` '`Starter`'. The simplest way to enable the features is to add a dependency to the `spring-boot-starter-actuator` '`Starter`'.
.Definition of Actuator .Definition of Actuator
@ -164,7 +164,7 @@ If your application is a web application (Spring MVC, Spring WebFlux, or Jersey)
| Yes | Yes
|=== |===
To learn more about the Actuator's endpoints and their request and response formats, please refer to the separate API documentation ({spring-boot-actuator-api}/html[HTML] or {spring-boot-actuator-api}/pdf/spring-boot-actuator-web-api.pdf[PDF]). To learn more about the Actuator's endpoints and their request and response formats, please refer to the separate API documentation ({spring-boot-actuator-restapi}/html[HTML] or {spring-boot-actuator-restapi}/pdf/spring-boot-actuator-web-api.pdf[PDF]).
@ -380,7 +380,7 @@ A typical Spring Security configuration might look something like the following
The preceding example uses `EndpointRequest.toAnyEndpoint()` to match a request to any endpoint and then ensures that all have the `ENDPOINT_ADMIN` role. The preceding example uses `EndpointRequest.toAnyEndpoint()` to match a request to any endpoint and then ensures that all have the `ENDPOINT_ADMIN` role.
Several other matcher methods are also available on `EndpointRequest`. Several other matcher methods are also available on `EndpointRequest`.
See the API documentation ({spring-boot-actuator-api}/html[HTML] or {spring-boot-actuator-api}/pdf/spring-boot-actuator-web-api.pdf[PDF]) for details. See the API documentation ({spring-boot-actuator-restapi}/html[HTML] or {spring-boot-actuator-restapi}/pdf/spring-boot-actuator-web-api.pdf[PDF]) for details.
If you deploy applications behind a firewall, you may prefer that all your actuator endpoints can be accessed without requiring authentication. If you deploy applications behind a firewall, you may prefer that all your actuator endpoints can be accessed without requiring authentication.
You can do so by changing the `management.endpoints.web.exposure.include` property, as follows: You can do so by changing the `management.endpoints.web.exposure.include` property, as follows:
@ -451,7 +451,7 @@ The following configuration permits `GET` and `POST` calls from the `example.com
management.endpoints.web.cors.allowed-methods=GET,POST management.endpoints.web.cors.allowed-methods=GET,POST
---- ----
TIP: See {sc-spring-boot-actuator-autoconfigure}/endpoint/web/CorsEndpointProperties.{sc-ext}[CorsEndpointProperties] for a complete list of options. TIP: See {spring-boot-actuator-autoconfigure-module-code}/endpoint/web/CorsEndpointProperties.java[CorsEndpointProperties] for a complete list of options.
@ -647,7 +647,7 @@ The roles can be configured using the `management.endpoint.health.roles` propert
NOTE: If you have secured your application and wish to use `always`, your security configuration must permit access to the health endpoint for both authenticated and unauthenticated users. NOTE: If you have secured your application and wish to use `always`, your security configuration must permit access to the health endpoint for both authenticated and unauthenticated users.
Health information is collected from the content of a {sc-spring-boot-actuator}/health/HealthIndicatorRegistry.{sc-ext}[`HealthIndicatorRegistry`] (by default all {sc-spring-boot-actuator}/health/HealthIndicator.{sc-ext}[`HealthIndicator`] instances defined in your `ApplicationContext`. Health information is collected from the content of a {spring-boot-actuator-module-code}/health/HealthIndicatorRegistry.java[`HealthIndicatorRegistry`] (by default all {spring-boot-actuator-module-code}/health/HealthIndicator.java[`HealthIndicator`] instances defined in your `ApplicationContext`.
Spring Boot includes a number of auto-configured `HealthIndicators` and you can also write your own. Spring Boot includes a number of auto-configured `HealthIndicators` and you can also write your own.
By default, the final system state is derived by the `HealthAggregator` which sorts the statuses from each `HealthIndicator` based on an ordered list of statuses. By default, the final system state is derived by the `HealthAggregator` which sorts the statuses from each `HealthIndicator` based on an ordered list of statuses.
The first status in the sorted list is used as the overall health status. The first status in the sorted list is used as the overall health status.
@ -664,43 +664,43 @@ The following `HealthIndicators` are auto-configured by Spring Boot when appropr
|=== |===
| Name | Description | Name | Description
| {sc-spring-boot-actuator}/cassandra/CassandraHealthIndicator.{sc-ext}[`CassandraHealthIndicator`] | {spring-boot-actuator-module-code}/cassandra/CassandraHealthIndicator.java[`CassandraHealthIndicator`]
| Checks that a Cassandra database is up. | Checks that a Cassandra database is up.
| {sc-spring-boot-actuator}/couchbase/CouchbaseHealthIndicator.{sc-ext}[`CouchbaseHealthIndicator`] | {spring-boot-actuator-module-code}/couchbase/CouchbaseHealthIndicator.java[`CouchbaseHealthIndicator`]
| Checks that a Couchbase cluster is up. | Checks that a Couchbase cluster is up.
| {sc-spring-boot-actuator}/system/DiskSpaceHealthIndicator.{sc-ext}[`DiskSpaceHealthIndicator`] | {spring-boot-actuator-module-code}/system/DiskSpaceHealthIndicator.java[`DiskSpaceHealthIndicator`]
| Checks for low disk space. | Checks for low disk space.
| {sc-spring-boot-actuator}/jdbc/DataSourceHealthIndicator.{sc-ext}[`DataSourceHealthIndicator`] | {spring-boot-actuator-module-code}/jdbc/DataSourceHealthIndicator.java[`DataSourceHealthIndicator`]
| Checks that a connection to `DataSource` can be obtained. | Checks that a connection to `DataSource` can be obtained.
| {sc-spring-boot-actuator}/elasticsearch/ElasticsearchHealthIndicator.{sc-ext}[`ElasticsearchHealthIndicator`] | {spring-boot-actuator-module-code}/elasticsearch/ElasticsearchHealthIndicator.java[`ElasticsearchHealthIndicator`]
| Checks that an Elasticsearch cluster is up. | Checks that an Elasticsearch cluster is up.
| {sc-spring-boot-actuator}/influx/InfluxDbHealthIndicator.{sc-ext}[`InfluxDbHealthIndicator`] | {spring-boot-actuator-module-code}/influx/InfluxDbHealthIndicator.java[`InfluxDbHealthIndicator`]
| Checks that an InfluxDB server is up. | Checks that an InfluxDB server is up.
| {sc-spring-boot-actuator}/jms/JmsHealthIndicator.{sc-ext}[`JmsHealthIndicator`] | {spring-boot-actuator-module-code}/jms/JmsHealthIndicator.java[`JmsHealthIndicator`]
| Checks that a JMS broker is up. | Checks that a JMS broker is up.
| {sc-spring-boot-actuator}/mail/MailHealthIndicator.{sc-ext}[`MailHealthIndicator`] | {spring-boot-actuator-module-code}/mail/MailHealthIndicator.java[`MailHealthIndicator`]
| Checks that a mail server is up. | Checks that a mail server is up.
| {sc-spring-boot-actuator}/mongo/MongoHealthIndicator.{sc-ext}[`MongoHealthIndicator`] | {spring-boot-actuator-module-code}/mongo/MongoHealthIndicator.java[`MongoHealthIndicator`]
| Checks that a Mongo database is up. | Checks that a Mongo database is up.
| {sc-spring-boot-actuator}/neo4j/Neo4jHealthIndicator.{sc-ext}[`Neo4jHealthIndicator`] | {spring-boot-actuator-module-code}/neo4j/Neo4jHealthIndicator.java[`Neo4jHealthIndicator`]
| Checks that a Neo4j server is up. | Checks that a Neo4j server is up.
| {sc-spring-boot-actuator}/amqp/RabbitHealthIndicator.{sc-ext}[`RabbitHealthIndicator`] | {spring-boot-actuator-module-code}/amqp/RabbitHealthIndicator.java[`RabbitHealthIndicator`]
| Checks that a Rabbit server is up. | Checks that a Rabbit server is up.
| {sc-spring-boot-actuator}/redis/RedisHealthIndicator.{sc-ext}[`RedisHealthIndicator`] | {spring-boot-actuator-module-code}/redis/RedisHealthIndicator.java[`RedisHealthIndicator`]
| Checks that a Redis server is up. | Checks that a Redis server is up.
| {sc-spring-boot-actuator}/solr/SolrHealthIndicator.{sc-ext}[`SolrHealthIndicator`] | {spring-boot-actuator-module-code}/solr/SolrHealthIndicator.java[`SolrHealthIndicator`]
| Checks that a Solr server is up. | Checks that a Solr server is up.
|=== |===
@ -708,7 +708,7 @@ TIP: You can disable them all by setting the `management.health.defaults.enabled
==== Writing Custom HealthIndicators ==== Writing Custom HealthIndicators
To provide custom health information, you can register Spring beans that implement the {sc-spring-boot-actuator}/health/HealthIndicator.{sc-ext}[`HealthIndicator`] interface. To provide custom health information, you can register Spring beans that implement the {spring-boot-actuator-module-code}/health/HealthIndicator.java[`HealthIndicator`] interface.
You need to provide an implementation of the `health()` method and return a `Health` response. You need to provide an implementation of the `health()` method and return a `Health` response.
The `Health` response should include a status and can optionally include additional details to be displayed. The `Health` response should include a status and can optionally include additional details to be displayed.
The following code shows a sample `HealthIndicator` implementation: The following code shows a sample `HealthIndicator` implementation:
@ -737,8 +737,8 @@ The following code shows a sample `HealthIndicator` implementation:
NOTE: The identifier for a given `HealthIndicator` is the name of the bean without the `HealthIndicator` suffix, if it exists. NOTE: The identifier for a given `HealthIndicator` is the name of the bean without the `HealthIndicator` suffix, if it exists.
In the preceding example, the health information is available in an entry named `my`. In the preceding example, the health information is available in an entry named `my`.
In addition to Spring Boot's predefined {sc-spring-boot-actuator}/health/Status.{sc-ext}[`Status`] types, it is also possible for `Health` to return a custom `Status` that represents a new system state. In addition to Spring Boot's predefined {spring-boot-actuator-module-code}/health/Status.java[`Status`] types, it is also possible for `Health` to return a custom `Status` that represents a new system state.
In such cases, a custom implementation of the {sc-spring-boot-actuator}/health/HealthAggregator.{sc-ext}[`HealthAggregator`] interface also needs to be provided, or the default implementation has to be configured by using the `management.health.status.order` configuration property. In such cases, a custom implementation of the {spring-boot-actuator-module-code}/health/HealthAggregator.java[`HealthAggregator`] interface also needs to be provided, or the default implementation has to be configured by using the `management.health.status.order` configuration property.
For example, assume a new `Status` with code `FATAL` is being used in one of your `HealthIndicator` implementations. For example, assume a new `Status` with code `FATAL` is being used in one of your `HealthIndicator` implementations.
To configure the severity order, add the following property to your application properties: To configure the severity order, add the following property to your application properties:
@ -782,12 +782,12 @@ The following table shows the default status mappings for the built-in statuses:
[[reactive-health-indicators]] [[reactive-health-indicators]]
==== Reactive Health Indicators ==== Reactive Health Indicators
For reactive applications, such as those using Spring WebFlux, `ReactiveHealthIndicator` provides a non-blocking contract for getting application health. For reactive applications, such as those using Spring WebFlux, `ReactiveHealthIndicator` provides a non-blocking contract for getting application health.
Similar to a traditional `HealthIndicator`, health information is collected from the content of a {sc-spring-boot-actuator}/health/ReactiveHealthIndicatorRegistry.{sc-ext}[`ReactiveHealthIndicatorRegistry`] (by default all {sc-spring-boot-actuator}/health/HealthIndicator.{sc-ext}[`HealthIndicator`] and {sc-spring-boot-actuator}/health/ReactiveHealthIndicator.{sc-ext}[`ReactiveHealthIndicator`] instances defined in your `ApplicationContext`. Similar to a traditional `HealthIndicator`, health information is collected from the content of a {spring-boot-actuator-module-code}/health/ReactiveHealthIndicatorRegistry.java[`ReactiveHealthIndicatorRegistry`] (by default all {spring-boot-actuator-module-code}/health/HealthIndicator.java[`HealthIndicator`] and {spring-boot-actuator-module-code}/health/ReactiveHealthIndicator.java[`ReactiveHealthIndicator`] instances defined in your `ApplicationContext`.
Regular `HealthIndicator` that do not check against a reactive API are executed on the elastic scheduler. Regular `HealthIndicator` that do not check against a reactive API are executed on the elastic scheduler.
TIP: In a reactive application, The `ReactiveHealthIndicatorRegistry` can be used to register and unregister health indicators at runtime. TIP: In a reactive application, The `ReactiveHealthIndicatorRegistry` can be used to register and unregister health indicators at runtime.
To provide custom health information from a reactive API, you can register Spring beans that implement the {sc-spring-boot-actuator}/health/ReactiveHealthIndicator.{sc-ext}[`ReactiveHealthIndicator`] interface. To provide custom health information from a reactive API, you can register Spring beans that implement the {spring-boot-actuator-module-code}/health/ReactiveHealthIndicator.java[`ReactiveHealthIndicator`] interface.
The following code shows a sample `ReactiveHealthIndicator` implementation: The following code shows a sample `ReactiveHealthIndicator` implementation:
[source,java,indent=0] [source,java,indent=0]
@ -815,16 +815,16 @@ The following `ReactiveHealthIndicators` are auto-configured by Spring Boot when
|=== |===
| Name | Description | Name | Description
| {sc-spring-boot-actuator}/cassandra/CassandraReactiveHealthIndicator.{sc-ext}[`CassandraReactiveHealthIndicator`] | {spring-boot-actuator-module-code}/cassandra/CassandraReactiveHealthIndicator.java[`CassandraReactiveHealthIndicator`]
| Checks that a Cassandra database is up. | Checks that a Cassandra database is up.
| {sc-spring-boot-actuator}/couchbase/CouchbaseReactiveHealthIndicator.{sc-ext}[`CouchbaseReactiveHealthIndicator`] | {spring-boot-actuator-module-code}/couchbase/CouchbaseReactiveHealthIndicator.java[`CouchbaseReactiveHealthIndicator`]
| Checks that a Couchbase cluster is up. | Checks that a Couchbase cluster is up.
| {sc-spring-boot-actuator}/mongo/MongoReactiveHealthIndicator.{sc-ext}[`MongoReactiveHealthIndicator`] | {spring-boot-actuator-module-code}/mongo/MongoReactiveHealthIndicator.java[`MongoReactiveHealthIndicator`]
| Checks that a Mongo database is up. | Checks that a Mongo database is up.
| {sc-spring-boot-actuator}/redis/RedisReactiveHealthIndicator.{sc-ext}[`RedisReactiveHealthIndicator`] | {spring-boot-actuator-module-code}/redis/RedisReactiveHealthIndicator.java[`RedisReactiveHealthIndicator`]
| Checks that a Redis server is up. | Checks that a Redis server is up.
|=== |===
@ -835,7 +835,7 @@ Also, any `HealthIndicator` that is not handled explicitly is wrapped automatica
[[production-ready-application-info]] [[production-ready-application-info]]
=== Application Information === Application Information
Application information exposes various information collected from all {sc-spring-boot-actuator}/info/InfoContributor.{sc-ext}[`InfoContributor`] beans defined in your `ApplicationContext`. Application information exposes various information collected from all {spring-boot-actuator-module-code}/info/InfoContributor.java[`InfoContributor`] beans defined in your `ApplicationContext`.
Spring Boot includes a number of auto-configured `InfoContributor` beans, and you can write your own. Spring Boot includes a number of auto-configured `InfoContributor` beans, and you can write your own.
@ -848,13 +848,13 @@ The following `InfoContributor` beans are auto-configured by Spring Boot, when a
|=== |===
| Name | Description | Name | Description
| {sc-spring-boot-actuator}/info/EnvironmentInfoContributor.{sc-ext}[`EnvironmentInfoContributor`] | {spring-boot-actuator-module-code}/info/EnvironmentInfoContributor.java[`EnvironmentInfoContributor`]
| Exposes any key from the `Environment` under the `info` key. | Exposes any key from the `Environment` under the `info` key.
| {sc-spring-boot-actuator}/info/GitInfoContributor.{sc-ext}[`GitInfoContributor`] | {spring-boot-actuator-module-code}/info/GitInfoContributor.java[`GitInfoContributor`]
| Exposes git information if a `git.properties` file is available. | Exposes git information if a `git.properties` file is available.
| {sc-spring-boot-actuator}/info/BuildInfoContributor.{sc-ext}[`BuildInfoContributor`] | {spring-boot-actuator-module-code}/info/BuildInfoContributor.java[`BuildInfoContributor`]
| Exposes build information if a `META-INF/build-info.properties` file is available. | Exposes build information if a `META-INF/build-info.properties` file is available.
|=== |===
@ -920,7 +920,7 @@ See "<<howto.adoc#howto-build-info,Generate build information>>" for more detail
[[production-ready-application-info-custom]] [[production-ready-application-info-custom]]
==== Writing Custom InfoContributors ==== Writing Custom InfoContributors
To provide custom application information, you can register Spring beans that implement the {sc-spring-boot-actuator}/info/InfoContributor.{sc-ext}[`InfoContributor`] interface. To provide custom application information, you can register Spring beans that implement the {spring-boot-actuator-module-code}/info/InfoContributor.java[`InfoContributor`] interface.
The following example contributes an `example` entry with a single value: The following example contributes an `example` entry with a single value:
@ -1215,7 +1215,7 @@ Spring Boot Actuator provides dependency management and auto-configuration for h
- <<production-ready-metrics-export-statsd,StatsD>> - <<production-ready-metrics-export-statsd,StatsD>>
- <<production-ready-metrics-export-wavefront,Wavefront>> - <<production-ready-metrics-export-wavefront,Wavefront>>
TIP: To learn more about Micrometer's capabilities, please refer to its https://micrometer.io/docs[reference documentation], in particular the {micrometer-concepts-documentation}[concepts section]. TIP: To learn more about Micrometer's capabilities, please refer to its https://micrometer.io/docs[reference documentation], in particular the {micrometer-concepts-docs}[concepts section].
@ -1279,7 +1279,7 @@ Spring Boot also <<production-ready-metrics-meter,configures built-in instrument
[[production-ready-metrics-export-appoptics]] [[production-ready-metrics-export-appoptics]]
==== AppOptics ==== AppOptics
By default, the AppOptics registry pushes metrics to https://api.appoptics.com/v1/measurements periodically. By default, the AppOptics registry pushes metrics to https://api.appoptics.com/v1/measurements periodically.
To export metrics to SaaS {micrometer-registry-documentation}/appoptics[AppOptics], your API token must be provided: To export metrics to SaaS {micrometer-registry-docs}/appoptics[AppOptics], your API token must be provided:
[source,properties,indent=0] [source,properties,indent=0]
---- ----
@ -1290,7 +1290,7 @@ To export metrics to SaaS {micrometer-registry-documentation}/appoptics[AppOptic
[[production-ready-metrics-export-atlas]] [[production-ready-metrics-export-atlas]]
==== Atlas ==== Atlas
By default, metrics are exported to {micrometer-registry-documentation}/atlas[Atlas] running on your local machine. By default, metrics are exported to {micrometer-registry-docs}/atlas[Atlas] running on your local machine.
The location of the https://github.com/Netflix/atlas[Atlas server] to use can be provided using: The location of the https://github.com/Netflix/atlas[Atlas server] to use can be provided using:
[source,properties,indent=0] [source,properties,indent=0]
@ -1303,7 +1303,7 @@ The location of the https://github.com/Netflix/atlas[Atlas server] to use can be
[[production-ready-metrics-export-datadog]] [[production-ready-metrics-export-datadog]]
==== Datadog ==== Datadog
Datadog registry pushes metrics to https://www.datadoghq.com[datadoghq] periodically. Datadog registry pushes metrics to https://www.datadoghq.com[datadoghq] periodically.
To export metrics to {micrometer-registry-documentation}/datadog[Datadog], your API key must be provided: To export metrics to {micrometer-registry-docs}/datadog[Datadog], your API key must be provided:
[source,properties,indent=0] [source,properties,indent=0]
---- ----
@ -1322,7 +1322,7 @@ You can also change the interval at which metrics are sent to Datadog:
[[production-ready-metrics-export-dynatrace]] [[production-ready-metrics-export-dynatrace]]
==== Dynatrace ==== Dynatrace
Dynatrace registry pushes metrics to the configured URI periodically. Dynatrace registry pushes metrics to the configured URI periodically.
To export metrics to {micrometer-registry-documentation}/dynatrace[Dynatrace], your API token, device ID, and URI must be provided: To export metrics to {micrometer-registry-docs}/dynatrace[Dynatrace], your API token, device ID, and URI must be provided:
[source,properties,indent=0] [source,properties,indent=0]
---- ----
@ -1342,7 +1342,7 @@ You can also change the interval at which metrics are sent to Dynatrace:
[[production-ready-metrics-export-elastic]] [[production-ready-metrics-export-elastic]]
==== Elastic ==== Elastic
By default, metrics are exported to {micrometer-registry-documentation}/elastic[Elastic] running on your local machine. By default, metrics are exported to {micrometer-registry-docs}/elastic[Elastic] running on your local machine.
The location of the Elastic server to use can be provided using the following property: The location of the Elastic server to use can be provided using the following property:
[source,properties,indent=0] [source,properties,indent=0]
@ -1354,7 +1354,7 @@ The location of the Elastic server to use can be provided using the following pr
[[production-ready-metrics-export-ganglia]] [[production-ready-metrics-export-ganglia]]
==== Ganglia ==== Ganglia
By default, metrics are exported to {micrometer-registry-documentation}/ganglia[Ganglia] running on your local machine. By default, metrics are exported to {micrometer-registry-docs}/ganglia[Ganglia] running on your local machine.
The http://ganglia.sourceforge.net[Ganglia server] host and port to use can be provided using: The http://ganglia.sourceforge.net[Ganglia server] host and port to use can be provided using:
[source,properties,indent=0] [source,properties,indent=0]
@ -1367,7 +1367,7 @@ The http://ganglia.sourceforge.net[Ganglia server] host and port to use can be p
[[production-ready-metrics-export-graphite]] [[production-ready-metrics-export-graphite]]
==== Graphite ==== Graphite
By default, metrics are exported to {micrometer-registry-documentation}/graphite[Graphite] running on your local machine. By default, metrics are exported to {micrometer-registry-docs}/graphite[Graphite] running on your local machine.
The https://graphiteapp.org[Graphite server] host and port to use can be provided using: The https://graphiteapp.org[Graphite server] host and port to use can be provided using:
[source,properties,indent=0] [source,properties,indent=0]
@ -1376,7 +1376,7 @@ The https://graphiteapp.org[Graphite server] host and port to use can be provide
management.metrics.export.graphite.port=9004 management.metrics.export.graphite.port=9004
---- ----
Micrometer provides a default `HierarchicalNameMapper` that governs how a dimensional meter id is {micrometer-registry-documentation}/graphite#_hierarchical_name_mapping[mapped to flat hierarchical names]. Micrometer provides a default `HierarchicalNameMapper` that governs how a dimensional meter id is {micrometer-registry-docs}/graphite#_hierarchical_name_mapping[mapped to flat hierarchical names].
TIP: To take control over this behaviour, define your `GraphiteMeterRegistry` and supply your own `HierarchicalNameMapper`. TIP: To take control over this behaviour, define your `GraphiteMeterRegistry` and supply your own `HierarchicalNameMapper`.
An auto-configured `GraphiteConfig` and `Clock` beans are provided unless you define your own: An auto-configured `GraphiteConfig` and `Clock` beans are provided unless you define your own:
@ -1394,7 +1394,7 @@ public GraphiteMeterRegistry graphiteMeterRegistry(GraphiteConfig config, Clock
[[production-ready-metrics-export-humio]] [[production-ready-metrics-export-humio]]
==== Humio ==== Humio
By default, the Humio registry pushes metrics to https://cloud.humio.com periodically. By default, the Humio registry pushes metrics to https://cloud.humio.com periodically.
To export metrics to SaaS {micrometer-registry-documentation}/humio[Humio], your API token must be provided: To export metrics to SaaS {micrometer-registry-docs}/humio[Humio], your API token must be provided:
[source,properties,indent=0] [source,properties,indent=0]
---- ----
@ -1413,7 +1413,7 @@ You should also configure one or more tags to identify the data source to which
[[production-ready-metrics-export-influx]] [[production-ready-metrics-export-influx]]
==== Influx ==== Influx
By default, metrics are exported to {micrometer-registry-documentation}/influx[Influx] running on your local machine. By default, metrics are exported to {micrometer-registry-docs}/influx[Influx] running on your local machine.
The location of the https://www.influxdata.com[Influx server] to use can be provided using: The location of the https://www.influxdata.com[Influx server] to use can be provided using:
[source,properties,indent=0] [source,properties,indent=0]
@ -1425,7 +1425,7 @@ The location of the https://www.influxdata.com[Influx server] to use can be prov
[[production-ready-metrics-export-jmx]] [[production-ready-metrics-export-jmx]]
==== JMX ==== JMX
Micrometer provides a hierarchical mapping to {micrometer-registry-documentation}/jmx[JMX], primarily as a cheap and portable way to view metrics locally. Micrometer provides a hierarchical mapping to {micrometer-registry-docs}/jmx[JMX], primarily as a cheap and portable way to view metrics locally.
By default, metrics are exported to the `metrics` JMX domain. By default, metrics are exported to the `metrics` JMX domain.
The domain to use can be provided using: The domain to use can be provided using:
@ -1434,7 +1434,7 @@ The domain to use can be provided using:
management.metrics.export.jmx.domain=com.example.app.metrics management.metrics.export.jmx.domain=com.example.app.metrics
---- ----
Micrometer provides a default `HierarchicalNameMapper` that governs how a dimensional meter id is {micrometer-registry-documentation}/jmx#_hierarchical_name_mapping[mapped to flat hierarchical names]. Micrometer provides a default `HierarchicalNameMapper` that governs how a dimensional meter id is {micrometer-registry-docs}/jmx#_hierarchical_name_mapping[mapped to flat hierarchical names].
TIP: To take control over this behaviour, define your `JmxMeterRegistry` and supply your own `HierarchicalNameMapper`. TIP: To take control over this behaviour, define your `JmxMeterRegistry` and supply your own `HierarchicalNameMapper`.
An auto-configured `JmxConfig` and `Clock` beans are provided unless you define your own: An auto-configured `JmxConfig` and `Clock` beans are provided unless you define your own:
@ -1451,7 +1451,7 @@ public JmxMeterRegistry jmxMeterRegistry(JmxConfig config, Clock clock) {
[[production-ready-metrics-export-kairos]] [[production-ready-metrics-export-kairos]]
==== KairosDB ==== KairosDB
By default, metrics are exported to {micrometer-registry-documentation}/kairos[KairosDB] running on your local machine. By default, metrics are exported to {micrometer-registry-docs}/kairos[KairosDB] running on your local machine.
The location of the https://kairosdb.github.io/[KairosDB server] to use can be provided using: The location of the https://kairosdb.github.io/[KairosDB server] to use can be provided using:
[source,properties,indent=0] [source,properties,indent=0]
@ -1463,7 +1463,7 @@ The location of the https://kairosdb.github.io/[KairosDB server] to use can be p
[[production-ready-metrics-export-newrelic]] [[production-ready-metrics-export-newrelic]]
==== New Relic ==== New Relic
New Relic registry pushes metrics to {micrometer-registry-documentation}/new-relic[New Relic] periodically. New Relic registry pushes metrics to {micrometer-registry-docs}/new-relic[New Relic] periodically.
To export metrics to https://newrelic.com[New Relic], your API key and account id must be provided: To export metrics to https://newrelic.com[New Relic], your API key and account id must be provided:
[source,properties,indent=0] [source,properties,indent=0]
@ -1483,7 +1483,7 @@ You can also change the interval at which metrics are sent to New Relic:
[[production-ready-metrics-export-prometheus]] [[production-ready-metrics-export-prometheus]]
==== Prometheus ==== Prometheus
{micrometer-registry-documentation}/prometheus[Prometheus] expects to scrape or poll individual app instances for metrics. {micrometer-registry-docs}/prometheus[Prometheus] expects to scrape or poll individual app instances for metrics.
Spring Boot provides an actuator endpoint available at `/actuator/prometheus` to present a https://prometheus.io[Prometheus scrape] with the appropriate format. Spring Boot provides an actuator endpoint available at `/actuator/prometheus` to present a https://prometheus.io[Prometheus scrape] with the appropriate format.
TIP: The endpoint is not available by default and must be exposed, see <<production-ready-endpoints-exposing-endpoints,exposing endpoints>> for more details. TIP: The endpoint is not available by default and must be exposed, see <<production-ready-endpoints-exposing-endpoints,exposing endpoints>> for more details.
@ -1519,7 +1519,7 @@ For advanced configuration, you can also provide your own `PrometheusPushGateway
[[production-ready-metrics-export-signalfx]] [[production-ready-metrics-export-signalfx]]
==== SignalFx ==== SignalFx
SignalFx registry pushes metrics to {micrometer-registry-documentation}/signalfx[SignalFx] periodically. SignalFx registry pushes metrics to {micrometer-registry-docs}/signalfx[SignalFx] periodically.
To export metrics to https://signalfx.com[SignalFx], your access token must be provided: To export metrics to https://signalfx.com[SignalFx], your access token must be provided:
[source,properties,indent=0] [source,properties,indent=0]
@ -1554,7 +1554,7 @@ You can also disable it explicitly:
[[production-ready-metrics-export-statsd]] [[production-ready-metrics-export-statsd]]
==== StatsD ==== StatsD
The StatsD registry pushes metrics over UDP to a StatsD agent eagerly. The StatsD registry pushes metrics over UDP to a StatsD agent eagerly.
By default, metrics are exported to a {micrometer-registry-documentation}/statsd[StatsD] agent running on your local machine. By default, metrics are exported to a {micrometer-registry-docs}/statsd[StatsD] agent running on your local machine.
The StatsD agent host and port to use can be provided using: The StatsD agent host and port to use can be provided using:
[source,properties,indent=0] [source,properties,indent=0]
@ -1574,7 +1574,7 @@ You can also change the StatsD line protocol to use (default to Datadog):
[[production-ready-metrics-export-wavefront]] [[production-ready-metrics-export-wavefront]]
==== Wavefront ==== Wavefront
Wavefront registry pushes metrics to {micrometer-registry-documentation}/wavefront[Wavefront] periodically. Wavefront registry pushes metrics to {micrometer-registry-docs}/wavefront[Wavefront] periodically.
If you are exporting metrics to https://www.wavefront.com/[Wavefront] directly, your API token must be provided: If you are exporting metrics to https://www.wavefront.com/[Wavefront] directly, your API token must be provided:
[source,properties,indent=0] [source,properties,indent=0]
@ -1616,7 +1616,7 @@ Spring Boot registers the following core metrics when applicable:
* Logback metrics: record the number of events logged to Logback at each level * Logback metrics: record the number of events logged to Logback at each level
* Uptime metrics: report a gauge for uptime and a fixed gauge representing the application's absolute start time * Uptime metrics: report a gauge for uptime and a fixed gauge representing the application's absolute start time
* Tomcat metrics * Tomcat metrics
* {spring-integration-reference}#micrometer-integration[Spring Integration] metrics * {spring-integration-docs}#micrometer-integration[Spring Integration] metrics
@ -1918,7 +1918,7 @@ The following properties allow per-meter customization:
| Publish a cumulative histogram with buckets defined by your SLAs. | Publish a cumulative histogram with buckets defined by your SLAs.
|=== |===
For more details on concepts behind `percentiles-histogram`, `percentiles` and `sla` refer to the {micrometer-concepts-documentation}#_histograms_and_percentiles["Histograms and percentiles" section] of the micrometer documentation. For more details on concepts behind `percentiles-histogram`, `percentiles` and `sla` refer to the {micrometer-concepts-docs}#_histograms_and_percentiles["Histograms and percentiles" section] of the micrometer documentation.
@ -2065,7 +2065,7 @@ include::{code-examples}/cloudfoundry/CloudFoundryCustomContextPathExample.java[
[[production-ready-whats-next]] [[production-ready-whats-next]]
== What to Read Next == What to Read Next
If you want to explore some of the concepts discussed in this chapter, you can take a look at the actuator {github-code}/spring-boot-samples[sample applications]. If you want to explore some of the concepts discussed in this chapter, you can take a look at the actuator {spring-boot-code}/spring-boot-samples[sample applications].
You also might want to read about graphing tools such as https://graphite.wikidot.com/[Graphite]. You also might want to read about graphing tools such as https://graphite.wikidot.com/[Graphite].
Otherwise, you can continue on, to read about <<deployment.adoc#deployment, '`deployment options`'>> or jump ahead for some in-depth information about Spring Boot's _<<build-tool-plugins.adoc#build-tool-plugins, build tool plugins>>_. Otherwise, you can continue on, to read about <<deployment.adoc#deployment, '`deployment options`'>> or jump ahead for some in-depth information about Spring Boot's _<<build-tool-plugins.adoc#build-tool-plugins, build tool plugins>>_.

@ -162,7 +162,7 @@ The following items are used as "`grab hints`":
| Spring Transaction Management. | Spring Transaction Management.
|=== |===
TIP: See subclasses of {sc-spring-boot-cli}/compiler/CompilerAutoConfiguration.{sc-ext}[`CompilerAutoConfiguration`] in the Spring Boot CLI source code to understand exactly how customizations are applied. TIP: See subclasses of {spring-boot-cli-module-code}/compiler/CompilerAutoConfiguration.java[`CompilerAutoConfiguration`] in the Spring Boot CLI source code to understand exactly how customizations are applied.
@ -433,8 +433,8 @@ See https://maven.apache.org/settings.html[Maven's settings documentation] for f
[[cli-whats-next]] [[cli-whats-next]]
== What to Read Next == What to Read Next
There are some {github-code}/spring-boot-project/spring-boot-cli/samples[sample groovy scripts] available from the GitHub repository that you can use to try out the Spring Boot CLI. There are some {spring-boot-code}/spring-boot-project/spring-boot-cli/samples[sample groovy scripts] available from the GitHub repository that you can use to try out the Spring Boot CLI.
There is also extensive Javadoc throughout the {sc-spring-boot-cli}[source code]. There is also extensive Javadoc throughout the {spring-boot-cli-module-code}[source code].
If you find that you reach the limit of the CLI tool, you probably want to look at converting your application to a full Gradle or Maven built "`Groovy project`". If you find that you reach the limit of the CLI tool, you probably want to look at converting your application to a full Gradle or Maven built "`Groovy project`".
The next section covers Spring Boot's "<<build-tool-plugins.adoc#build-tool-plugins, Build tool plugins>>", which you can use with Gradle or Maven. The next section covers Spring Boot's "<<build-tool-plugins.adoc#build-tool-plugins, Build tool plugins>>", which you can use with Gradle or Maven.

@ -108,7 +108,7 @@ Inside your `banner.txt` file, you can use any of the following placeholders:
| `${Ansi.NAME}` (or `${AnsiColor.NAME}`, `${AnsiBackground.NAME}`, `${AnsiStyle.NAME}`) | `${Ansi.NAME}` (or `${AnsiColor.NAME}`, `${AnsiBackground.NAME}`, `${AnsiStyle.NAME}`)
| Where `NAME` is the name of an ANSI escape code. | Where `NAME` is the name of an ANSI escape code.
See {sc-spring-boot}/ansi/AnsiPropertySource.{sc-ext}[`AnsiPropertySource`] for details. See {spring-boot-module-code}/ansi/AnsiPropertySource.java[`AnsiPropertySource`] for details.
| `${application.title}` | `${application.title}`
| The title of your application, as declared in `MANIFEST.MF`. | The title of your application, as declared in `MANIFEST.MF`.
@ -156,7 +156,7 @@ In most cases, these are references to `@Configuration` classes, but they could
It is also possible to configure the `SpringApplication` by using an `application.properties` file. It is also possible to configure the `SpringApplication` by using an `application.properties` file.
See _<<boot-features-external-config>>_ for details. See _<<boot-features-external-config>>_ for details.
For a complete list of the configuration options, see the {dc-spring-boot}/SpringApplication.{dc-ext}[`SpringApplication` Javadoc]. For a complete list of the configuration options, see the {spring-boot-module-api}/SpringApplication.html[`SpringApplication` Javadoc].
@ -173,13 +173,13 @@ include::{code-examples}/builder/SpringApplicationBuilderExample.java[tag=hierar
NOTE: There are some restrictions when creating an `ApplicationContext` hierarchy. NOTE: There are some restrictions when creating an `ApplicationContext` hierarchy.
For example, Web components *must* be contained within the child context, and the same `Environment` is used for both parent and child contexts. For example, Web components *must* be contained within the child context, and the same `Environment` is used for both parent and child contexts.
See the {dc-spring-boot}/builder/SpringApplicationBuilder.{dc-ext}[`SpringApplicationBuilder` Javadoc] for full details. See the {spring-boot-module-api}/builder/SpringApplicationBuilder.html[`SpringApplicationBuilder` Javadoc] for full details.
[[boot-features-application-events-and-listeners]] [[boot-features-application-events-and-listeners]]
=== Application Events and Listeners === Application Events and Listeners
In addition to the usual Spring Framework events, such as {spring-javadoc}/context/event/ContextRefreshedEvent.{dc-ext}[`ContextRefreshedEvent`], a `SpringApplication` sends some additional application events. In addition to the usual Spring Framework events, such as {spring-framework-api}/context/event/ContextRefreshedEvent.html[`ContextRefreshedEvent`], a `SpringApplication` sends some additional application events.
[NOTE] [NOTE]
==== ====
@ -312,7 +312,7 @@ When such an exception is encountered, Spring Boot returns the exit code provide
[[boot-features-application-admin]] [[boot-features-application-admin]]
=== Admin Features === Admin Features
It is possible to enable admin-related features for the application by specifying the `spring.application.admin.enabled` property. It is possible to enable admin-related features for the application by specifying the `spring.application.admin.enabled` property.
This exposes the {sc-spring-boot}/admin/SpringApplicationAdminMXBean.{sc-ext}[`SpringApplicationAdminMXBean`] on the platform `MBeanServer`. This exposes the {spring-boot-module-code}/admin/SpringApplicationAdminMXBean.java[`SpringApplicationAdminMXBean`] on the platform `MBeanServer`.
You could use this feature to administer your Spring Boot application remotely. You could use this feature to administer your Spring Boot application remotely.
This feature could also be useful for any service wrapper implementation. This feature could also be useful for any service wrapper implementation.
@ -332,9 +332,9 @@ Spring Boot uses a very particular `PropertySource` order that is designed to al
Properties are considered in the following order: Properties are considered in the following order:
. <<using-boot-devtools-globalsettings,Devtools global settings properties>> on your home directory (`~/.spring-boot-devtools.properties` when devtools is active). . <<using-boot-devtools-globalsettings,Devtools global settings properties>> on your home directory (`~/.spring-boot-devtools.properties` when devtools is active).
. {spring-javadoc}/test/context/TestPropertySource.{dc-ext}[`@TestPropertySource`] annotations on your tests. . {spring-framework-api}/test/context/TestPropertySource.html[`@TestPropertySource`] annotations on your tests.
. `properties` attribute on your tests. . `properties` attribute on your tests.
Available on {dc-spring-boot-test}/context/SpringBootTest.{dc-ext}[`@SpringBootTest`] and the <<boot-features-testing-spring-boot-applications-testing-autoconfigured-tests,test annotations for testing a particular slice of your application>>. Available on {spring-boot-test-module-api}/context/SpringBootTest.html[`@SpringBootTest`] and the <<boot-features-testing-spring-boot-applications-testing-autoconfigured-tests,test annotations for testing a particular slice of your application>>.
. Command line arguments. . Command line arguments.
. Properties from `SPRING_APPLICATION_JSON` (inline JSON embedded in an environment variable or system property). . Properties from `SPRING_APPLICATION_JSON` (inline JSON embedded in an environment variable or system property).
. `ServletConfig` init parameters. . `ServletConfig` init parameters.
@ -347,7 +347,7 @@ Properties are considered in the following order:
. <<boot-features-external-config-profile-specific-properties,Profile-specific application properties>> packaged inside your jar (`application-\{profile}.properties` and YAML variants). . <<boot-features-external-config-profile-specific-properties,Profile-specific application properties>> packaged inside your jar (`application-\{profile}.properties` and YAML variants).
. Application properties outside of your packaged jar (`application.properties` and YAML variants). . Application properties outside of your packaged jar (`application.properties` and YAML variants).
. Application properties packaged inside your jar (`application.properties` and YAML variants). . Application properties packaged inside your jar (`application.properties` and YAML variants).
. {spring-javadoc}/context/annotation/PropertySource.{dc-ext}[`@PropertySource`] annotations on your `@Configuration` classes. . {spring-framework-api}/context/annotation/PropertySource.html[`@PropertySource`] annotations on your `@Configuration` classes.
. Default properties (specified by setting `SpringApplication.setDefaultProperties`). . Default properties (specified by setting `SpringApplication.setDefaultProperties`).
To provide a concrete example, suppose you develop a `@Component` that uses a `name` property, as shown in the following example: To provide a concrete example, suppose you develop a `@Component` that uses a `name` property, as shown in the following example:
@ -651,7 +651,7 @@ If the `development`, `production` and `eu-central` profiles are *not* enabled,
==== ====
`spring.profiles` can therefore contain a simple profile name (for example `production`) or a profile expression. `spring.profiles` can therefore contain a simple profile name (for example `production`) or a profile expression.
A profile expression allows for more complicated profile logic to be expressed, for example `production & (eu-central | eu-west)`. A profile expression allows for more complicated profile logic to be expressed, for example `production & (eu-central | eu-west)`.
Check the {spring-reference}core.html#beans-definition-profiles-java[reference guide] for more details. Check the {spring-framework-docs}core.html#beans-definition-profiles-java[reference guide] for more details.
==== ====
If none are explicitly active when the application context starts, the default profiles are activated. If none are explicitly active when the application context starts, the default profiles are activated.
@ -1119,7 +1119,7 @@ Spring Boot has dedicated support for expressing durations.
If you expose a `java.time.Duration` property, the following formats in application properties are available: If you expose a `java.time.Duration` property, the following formats in application properties are available:
* A regular `long` representation (using milliseconds as the default unit unless a `@DurationUnit` has been specified) * A regular `long` representation (using milliseconds as the default unit unless a `@DurationUnit` has been specified)
* The standard ISO-8601 format {java-javadoc}/java/time/Duration.html#parse-java.lang.CharSequence-[used by `java.time.Duration`] * The standard ISO-8601 format {java-api}/java/time/Duration.html#parse-java.lang.CharSequence-[used by `java.time.Duration`]
* A more readable format where the value and the unit are coupled (e.g. `10s` means 10 seconds) * A more readable format where the value and the unit are coupled (e.g. `10s` means 10 seconds)
Consider the following example: Consider the following example:
@ -1238,7 +1238,7 @@ You can also add a custom Spring `Validator` by creating a bean definition calle
The `@Bean` method should be declared `static`. The `@Bean` method should be declared `static`.
The configuration properties validator is created very early in the application's lifecycle, and declaring the `@Bean` method as static lets the bean be created without having to instantiate the `@Configuration` class. The configuration properties validator is created very early in the application's lifecycle, and declaring the `@Bean` method as static lets the bean be created without having to instantiate the `@Configuration` class.
Doing so avoids any problems that may be caused by early instantiation. Doing so avoids any problems that may be caused by early instantiation.
There is a {github-code}/spring-boot-samples/spring-boot-sample-property-validation[property validation sample] that shows how to set things up. There is a {spring-boot-code}/spring-boot-samples/spring-boot-sample-property-validation[property validation sample] that shows how to set things up.
TIP: The `spring-boot-actuator` module includes an endpoint that exposes all `@ConfigurationProperties` beans. TIP: The `spring-boot-actuator` module includes an endpoint that exposes all `@ConfigurationProperties` beans.
Point your web browser to `/actuator/configprops` or use the equivalent JMX endpoint. Point your web browser to `/actuator/configprops` or use the equivalent JMX endpoint.
@ -1312,7 +1312,7 @@ This means that you can specify active profiles in `application.properties` and
Sometimes, it is useful to have profile-specific properties that *add* to the active profiles rather than replace them. Sometimes, it is useful to have profile-specific properties that *add* to the active profiles rather than replace them.
The `spring.profiles.include` property can be used to unconditionally add active profiles. The `spring.profiles.include` property can be used to unconditionally add active profiles.
The `SpringApplication` entry point also has a Java API for setting additional profiles (that is, on top of those activated by the `spring.profiles.active` property). The `SpringApplication` entry point also has a Java API for setting additional profiles (that is, on top of those activated by the `spring.profiles.active` property).
See the `setAdditionalProfiles()` method in {dc-spring-boot}/SpringApplication.html[SpringApplication]. See the `setAdditionalProfiles()` method in {spring-boot-module-api}/SpringApplication.html[SpringApplication].
For example, when an application with the following properties is run by using the switch, `--spring.profiles.active=prod`, the `proddb` and `prodmq` profiles are also activated: For example, when an application with the following properties is run by using the switch, `--spring.profiles.active=prod`, the `proddb` and `prodmq` profiles are also activated:
@ -1349,7 +1349,7 @@ See "<<boot-features-external-config-profile-specific-properties>>" for details.
[[boot-features-logging]] [[boot-features-logging]]
== Logging == Logging
Spring Boot uses https://commons.apache.org/logging[Commons Logging] for all internal logging but leaves the underlying log implementation open. Spring Boot uses https://commons.apache.org/logging[Commons Logging] for all internal logging but leaves the underlying log implementation open.
Default configurations are provided for {java-javadoc}/java/util/logging/package-summary.html[Java Util Logging], https://logging.apache.org/log4j/2.x/[Log4J2], and https://logback.qos.ch/[Logback]. Default configurations are provided for {java-api}/java/util/logging/package-summary.html[Java Util Logging], https://logging.apache.org/log4j/2.x/[Log4J2], and https://logback.qos.ch/[Logback].
In each case, loggers are pre-configured to use console output with optional file output also available. In each case, loggers are pre-configured to use console output with optional file output also available.
By default, if you use the "`Starters`", Logback is used for logging. Appropriate Logback routing is also included to ensure that dependent libraries that use Java Util Logging, Commons Logging, Log4J, or SLF4J all work correctly. By default, if you use the "`Starters`", Logback is used for logging. Appropriate Logback routing is also included to ensure that dependent libraries that use Java Util Logging, Commons Logging, Log4J, or SLF4J all work correctly.
@ -1410,7 +1410,7 @@ Doing so enables trace logging for a selection of core loggers (embedded contain
[[boot-features-logging-color-coded-output]] [[boot-features-logging-color-coded-output]]
==== Color-coded Output ==== Color-coded Output
If your terminal supports ANSI, color output is used to aid readability. If your terminal supports ANSI, color output is used to aid readability.
You can set `spring.output.ansi.enabled` to a {dc-spring-boot}/ansi/AnsiOutput.Enabled.{dc-ext}[supported value] to override the auto-detection. You can set `spring.output.ansi.enabled` to a {spring-boot-module-api}/ansi/AnsiOutput.Enabled.html[supported value] to override the auto-detection.
Color coding is configured by using the `%clr` conversion word. Color coding is configured by using the `%clr` conversion word.
In its simplest form, the converter colors the output according to the log level, as shown in the following example: In its simplest form, the converter colors the output according to the log level, as shown in the following example:
@ -1644,9 +1644,9 @@ To help with the customization, some other properties are transferred from the S
All the supported logging systems can consult System properties when parsing their configuration files. All the supported logging systems can consult System properties when parsing their configuration files.
See the default configurations in `spring-boot.jar` for examples: See the default configurations in `spring-boot.jar` for examples:
* {github-code}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/defaults.xml[Logback] * {spring-boot-code}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/defaults.xml[Logback]
* {github-code}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/log4j2/log4j2.xml[Log4j 2] * {spring-boot-code}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/log4j2/log4j2.xml[Log4j 2]
* {github-code}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/java/logging-file.properties[Java Util logging] * {spring-boot-code}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/java/logging-file.properties[Java Util logging]
[TIP] [TIP]
==== ====
@ -1693,7 +1693,7 @@ Profile sections are supported anywhere within the `<configuration>` element.
Use the `name` attribute to specify which profile accepts the configuration. Use the `name` attribute to specify which profile accepts the configuration.
The `<springProfile>` tag can contain a simple profile name (for example `staging`) or a profile expression. The `<springProfile>` tag can contain a simple profile name (for example `staging`) or a profile expression.
A profile expression allows for more complicated profile logic to be expressed, for example `production & (eu-central | eu-west)`. A profile expression allows for more complicated profile logic to be expressed, for example `production & (eu-central | eu-west)`.
Check the {spring-reference}core.html#beans-definition-profiles-java[reference guide] for more details. Check the {spring-framework-docs}core.html#beans-definition-profiles-java[reference guide] for more details.
The following listing shows three sample profiles: The following listing shows three sample profiles:
[source,xml,indent=0] [source,xml,indent=0]
@ -1756,7 +1756,7 @@ The basename of the resource bundle as well as several other attributes can be c
TIP: `spring.messages.basename` supports comma-separated list of locations, either a package qualifier or a resource resolved from the classpath root. TIP: `spring.messages.basename` supports comma-separated list of locations, either a package qualifier or a resource resolved from the classpath root.
See {sc-spring-boot-autoconfigure}/context/MessageSourceProperties.{sc-ext}[`MessageSourceProperties`] for more supported options. See {spring-boot-autoconfigure-module-code}/context/MessageSourceProperties.java[`MessageSourceProperties`] for more supported options.
@ -1810,7 +1810,7 @@ If you have not yet developed a Spring Boot web application, you can follow the
[[boot-features-spring-mvc]] [[boot-features-spring-mvc]]
=== The "`Spring Web MVC Framework`" === The "`Spring Web MVC Framework`"
The {spring-reference}web.html#mvc[Spring Web MVC framework] (often referred to as simply "`Spring MVC`") is a rich "`model view controller`" web framework. The {spring-framework-docs}web.html#mvc[Spring Web MVC framework] (often referred to as simply "`Spring MVC`") is a rich "`model view controller`" web framework.
Spring MVC lets you create special `@Controller` or `@RestController` beans to handle incoming HTTP requests. Spring MVC lets you create special `@Controller` or `@RestController` beans to handle incoming HTTP requests.
Methods in your controller are mapped to HTTP by using `@RequestMapping` annotations. Methods in your controller are mapped to HTTP by using `@RequestMapping` annotations.
@ -1840,7 +1840,7 @@ The following code shows a typical `@RestController` that serves JSON data:
} }
---- ----
Spring MVC is part of the core Spring Framework, and detailed information is available in the {spring-reference}web.html#mvc[reference documentation]. Spring MVC is part of the core Spring Framework, and detailed information is available in the {spring-framework-docs}web.html#mvc[reference documentation].
There are also several guides that cover Spring MVC available at https://spring.io/guides. There are also several guides that cover Spring MVC available at https://spring.io/guides.
@ -1860,7 +1860,7 @@ The auto-configuration adds the following features on top of Spring's defaults:
* Custom `Favicon` support (covered <<boot-features-spring-mvc-favicon,later in this document>>). * Custom `Favicon` support (covered <<boot-features-spring-mvc-favicon,later in this document>>).
* Automatic use of a `ConfigurableWebBindingInitializer` bean (covered <<boot-features-spring-mvc-web-binding-initializer,later in this document>>). * Automatic use of a `ConfigurableWebBindingInitializer` bean (covered <<boot-features-spring-mvc-web-binding-initializer,later in this document>>).
If you want to keep Spring Boot MVC features and you want to add additional {spring-reference}web.html#mvc[MVC configuration] (interceptors, formatters, view controllers, and other features), you can add your own `@Configuration` class of type `WebMvcConfigurer` but *without* `@EnableWebMvc`. If you want to keep Spring Boot MVC features and you want to add additional {spring-framework-docs}web.html#mvc[MVC configuration] (interceptors, formatters, view controllers, and other features), you can add your own `@Configuration` class of type `WebMvcConfigurer` but *without* `@EnableWebMvc`.
If you wish to provide custom instances of `RequestMappingHandlerMapping`, `RequestMappingHandlerAdapter`, or `ExceptionHandlerExceptionResolver`, you can declare a `WebMvcRegistrationsAdapter` instance to provide such components. If you wish to provide custom instances of `RequestMappingHandlerMapping`, `RequestMappingHandlerAdapter`, or `ExceptionHandlerExceptionResolver`, you can declare a `WebMvcRegistrationsAdapter` instance to provide such components.
If you want to take complete control of Spring MVC, you can add your own `@Configuration` annotated with `@EnableWebMvc`. If you want to take complete control of Spring MVC, you can add your own `@Configuration` annotated with `@EnableWebMvc`.
@ -1930,15 +1930,15 @@ You can also use it on classes that contain serializers/deserializers as inner c
All `@JsonComponent` beans in the `ApplicationContext` are automatically registered with Jackson. All `@JsonComponent` beans in the `ApplicationContext` are automatically registered with Jackson.
Because `@JsonComponent` is meta-annotated with `@Component`, the usual component-scanning rules apply. Because `@JsonComponent` is meta-annotated with `@Component`, the usual component-scanning rules apply.
Spring Boot also provides {sc-spring-boot}/jackson/JsonObjectSerializer.{sc-ext}[`JsonObjectSerializer`] and {sc-spring-boot}/jackson/JsonObjectDeserializer.{sc-ext}[`JsonObjectDeserializer`] base classes that provide useful alternatives to the standard Jackson versions when serializing objects. Spring Boot also provides {spring-boot-module-code}/jackson/JsonObjectSerializer.java[`JsonObjectSerializer`] and {spring-boot-module-code}/jackson/JsonObjectDeserializer.java[`JsonObjectDeserializer`] base classes that provide useful alternatives to the standard Jackson versions when serializing objects.
See {dc-spring-boot}/jackson/JsonObjectSerializer.{dc-ext}[`JsonObjectSerializer`] and {dc-spring-boot}/jackson/JsonObjectDeserializer.{dc-ext}[`JsonObjectDeserializer`] in the Javadoc for details. See {spring-boot-module-api}/jackson/JsonObjectSerializer.html[`JsonObjectSerializer`] and {spring-boot-module-api}/jackson/JsonObjectDeserializer.html[`JsonObjectDeserializer`] in the Javadoc for details.
[[boot-features-spring-message-codes]] [[boot-features-spring-message-codes]]
==== MessageCodesResolver ==== MessageCodesResolver
Spring MVC has a strategy for generating error codes for rendering error messages from binding errors: `MessageCodesResolver`. Spring MVC has a strategy for generating error codes for rendering error messages from binding errors: `MessageCodesResolver`.
If you set the `spring.mvc.message-codes-resolver.format` property `PREFIX_ERROR_CODE` or `POSTFIX_ERROR_CODE`, Spring Boot creates one for you (see the enumeration in {spring-javadoc}/validation/DefaultMessageCodesResolver.Format.{dc-ext}[`DefaultMessageCodesResolver.Format`]). If you set the `spring.mvc.message-codes-resolver.format` property `PREFIX_ERROR_CODE` or `POSTFIX_ERROR_CODE`, Spring Boot creates one for you (see the enumeration in {spring-framework-api}/validation/DefaultMessageCodesResolver.Format.html[`DefaultMessageCodesResolver.Format`]).
@ -1985,7 +1985,7 @@ To use cache busting, the following configuration configures a cache busting sol
NOTE: Links to resources are rewritten in templates at runtime, thanks to a `ResourceUrlEncodingFilter` that is auto-configured for Thymeleaf and FreeMarker. NOTE: Links to resources are rewritten in templates at runtime, thanks to a `ResourceUrlEncodingFilter` that is auto-configured for Thymeleaf and FreeMarker.
You should manually declare this filter when using JSPs. You should manually declare this filter when using JSPs.
Other template engines are currently not automatically supported but can be with custom template macros/helpers and the use of the {spring-javadoc}/web/servlet/resource/ResourceUrlProvider.{dc-ext}[`ResourceUrlProvider`]. Other template engines are currently not automatically supported but can be with custom template macros/helpers and the use of the {spring-framework-api}/web/servlet/resource/ResourceUrlProvider.html[`ResourceUrlProvider`].
When loading resources dynamically with, for example, a JavaScript module loader, renaming files is not an option. When loading resources dynamically with, for example, a JavaScript module loader, renaming files is not an option.
That is why other strategies are also supported and can be combined. A "fixed" strategy adds a static version string in the URL without changing the file name, as shown in the following example: That is why other strategies are also supported and can be combined. A "fixed" strategy adds a static version string in the URL without changing the file name, as shown in the following example:
@ -2001,11 +2001,11 @@ That is why other strategies are also supported and can be combined. A "fixed" s
With this configuration, JavaScript modules located under `"/js/lib/"` use a fixed versioning strategy (`"/v12/js/lib/mymodule.js"`), while other resources still use the content one (`<link href="/css/spring-2a2d595e6ed9a0b24f027f2b63b134d6.css"/>`). With this configuration, JavaScript modules located under `"/js/lib/"` use a fixed versioning strategy (`"/v12/js/lib/mymodule.js"`), while other resources still use the content one (`<link href="/css/spring-2a2d595e6ed9a0b24f027f2b63b134d6.css"/>`).
See {sc-spring-boot-autoconfigure}/web/ResourceProperties.{sc-ext}[`ResourceProperties`] for more supported options. See {spring-boot-autoconfigure-module-code}/web/ResourceProperties.java[`ResourceProperties`] for more supported options.
[TIP] [TIP]
==== ====
This feature has been thoroughly described in a dedicated https://spring.io/blog/2014/07/24/spring-framework-4-1-handling-static-web-resources[blog post] and in Spring Framework's {spring-reference}web.html#mvc-config-static-resources[reference documentation]. This feature has been thoroughly described in a dedicated https://spring.io/blog/2014/07/24/spring-framework-4-1-handling-static-web-resources[blog post] and in Spring Framework's {spring-framework-docs}web.html#mvc-config-static-resources[reference documentation].
==== ====
[[boot-features-spring-mvc-welcome-page]] [[boot-features-spring-mvc-welcome-page]]
@ -2027,7 +2027,7 @@ If such a file is present, it is automatically used as the favicon of the applic
Spring MVC can map incoming HTTP requests to handlers by looking at the request path and matching it to the mappings defined in your application (for example, `@GetMapping` annotations on Controller methods). Spring MVC can map incoming HTTP requests to handlers by looking at the request path and matching it to the mappings defined in your application (for example, `@GetMapping` annotations on Controller methods).
Spring Boot chooses to disable suffix pattern matching by default, which means that requests like `"GET /projects/spring-boot.json"` won't be matched to `@GetMapping("/projects/spring-boot")` mappings. Spring Boot chooses to disable suffix pattern matching by default, which means that requests like `"GET /projects/spring-boot.json"` won't be matched to `@GetMapping("/projects/spring-boot")` mappings.
This is considered as a {spring-reference}web.html#mvc-ann-requestmapping-suffix-pattern-match[best practice for Spring MVC applications]. This is considered as a {spring-framework-docs}web.html#mvc-ann-requestmapping-suffix-pattern-match[best practice for Spring MVC applications].
This feature was mainly useful in the past for HTTP clients which did not send proper "Accept" request headers; we needed to make sure to send the correct Content Type to the client. This feature was mainly useful in the past for HTTP clients which did not send proper "Accept" request headers; we needed to make sure to send the correct Content Type to the client.
Nowadays, Content Negotiation is much more reliable. Nowadays, Content Negotiation is much more reliable.
@ -2192,7 +2192,7 @@ For more complex mappings, you can also add beans that implement the `ErrorViewR
---- ----
You can also use regular Spring MVC features such as {spring-reference}web.html#mvc-exceptionhandlers[`@ExceptionHandler` methods] and {spring-reference}web.html#mvc-ann-controller-advice[`@ControllerAdvice`]. You can also use regular Spring MVC features such as {spring-framework-docs}web.html#mvc-exceptionhandlers[`@ExceptionHandler` methods] and {spring-framework-docs}web.html#mvc-ann-controller-advice[`@ControllerAdvice`].
The `ErrorController` then picks up any unhandled exceptions. The `ErrorController` then picks up any unhandled exceptions.
@ -2262,9 +2262,9 @@ Note that doing so disables the `ObjectMapper` customization described earlier.
==== CORS Support ==== CORS Support
https://en.wikipedia.org/wiki/Cross-origin_resource_sharing[Cross-origin resource sharing] (CORS) is a https://www.w3.org/TR/cors/[W3C specification] implemented by https://caniuse.com/#feat=cors[most browsers] that lets you specify in a flexible way what kind of cross-domain requests are authorized., instead of using some less secure and less powerful approaches such as IFRAME or JSONP. https://en.wikipedia.org/wiki/Cross-origin_resource_sharing[Cross-origin resource sharing] (CORS) is a https://www.w3.org/TR/cors/[W3C specification] implemented by https://caniuse.com/#feat=cors[most browsers] that lets you specify in a flexible way what kind of cross-domain requests are authorized., instead of using some less secure and less powerful approaches such as IFRAME or JSONP.
As of version 4.2, Spring MVC {spring-reference}web.html#cors[supports CORS]. As of version 4.2, Spring MVC {spring-framework-docs}web.html#cors[supports CORS].
Using {spring-reference}web.html#controller-method-cors-configuration[controller method CORS configuration] with {spring-javadoc}/web/bind/annotation/CrossOrigin.{dc-ext}[`@CrossOrigin`] annotations in your Spring Boot application does not require any specific configuration. Using {spring-framework-docs}web.html#controller-method-cors-configuration[controller method CORS configuration] with {spring-framework-api}/web/bind/annotation/CrossOrigin.html[`@CrossOrigin`] annotations in your Spring Boot application does not require any specific configuration.
{spring-reference}web.html#global-cors-configuration[Global CORS configuration] can be defined by registering a `WebMvcConfigurer` bean with a customized `addCorsMappings(CorsRegistry)` method, as shown in the following example: {spring-framework-docs}web.html#global-cors-configuration[Global CORS configuration] can be defined by registering a `WebMvcConfigurer` bean with a customized `addCorsMappings(CorsRegistry)` method, as shown in the following example:
[source,java,indent=0] [source,java,indent=0]
---- ----
@ -2350,7 +2350,7 @@ The annotation-based one is quite close to the Spring MVC model, as shown in the
} }
---- ----
WebFlux is part of the Spring Framework and detailed information is available in its {spring-reference}web-reactive.html#webflux-fn[reference documentation]. WebFlux is part of the Spring Framework and detailed information is available in its {spring-framework-docs}web-reactive.html#webflux-fn[reference documentation].
TIP: You can define as many `RouterFunction` beans as you like to modularize the definition of the router. TIP: You can define as many `RouterFunction` beans as you like to modularize the definition of the router.
Beans can be ordered if you need to apply a precedence. Beans can be ordered if you need to apply a precedence.
@ -2372,7 +2372,7 @@ The auto-configuration adds the following features on top of Spring's defaults:
* Configuring codecs for `HttpMessageReader` and `HttpMessageWriter` instances (described <<boot-features-webflux-httpcodecs,later in this document>>). * Configuring codecs for `HttpMessageReader` and `HttpMessageWriter` instances (described <<boot-features-webflux-httpcodecs,later in this document>>).
* Support for serving static resources, including support for WebJars (described <<boot-features-spring-mvc-static-content,later in this document>>). * Support for serving static resources, including support for WebJars (described <<boot-features-spring-mvc-static-content,later in this document>>).
If you want to keep Spring Boot WebFlux features and you want to add additional {spring-reference}web.html#web-reactive[WebFlux configuration], you can add your own `@Configuration` class of type `WebFluxConfigurer` but *without* `@EnableWebFlux`. If you want to keep Spring Boot WebFlux features and you want to add additional {spring-framework-docs}web.html#web-reactive[WebFlux configuration], you can add your own `@Configuration` class of type `WebFluxConfigurer` but *without* `@EnableWebFlux`.
If you want to take complete control of Spring WebFlux, you can add your own `@Configuration` annotated with `@EnableWebFlux`. If you want to take complete control of Spring WebFlux, you can add your own `@Configuration` annotated with `@EnableWebFlux`.
@ -2598,7 +2598,7 @@ You can also use a filter instead of a servlet by setting `spring.jersey.type=fi
The filter has an `@Order`, which you can set with `spring.jersey.filter.order`. The filter has an `@Order`, which you can set with `spring.jersey.filter.order`.
Both the servlet and the filter registrations can be given init parameters by using `spring.jersey.init.*` to specify a map of properties. Both the servlet and the filter registrations can be given init parameters by using `spring.jersey.init.*` to specify a map of properties.
There is a {github-code}/spring-boot-samples/spring-boot-sample-jersey[Jersey sample] so that you can see how to set things up. There is a {spring-boot-code}/spring-boot-samples/spring-boot-sample-jersey[Jersey sample] so that you can see how to set things up.
@ -2699,7 +2699,7 @@ Spring Boot tries as much as possible to expose common settings, but this is not
For those cases, dedicated namespaces offer server-specific customizations (see `server.tomcat` and `server.undertow`). For those cases, dedicated namespaces offer server-specific customizations (see `server.tomcat` and `server.undertow`).
For instance, <<howto.adoc#howto-configure-accesslogs,access logs>> can be configured with specific features of the embedded servlet container. For instance, <<howto.adoc#howto-configure-accesslogs,access logs>> can be configured with specific features of the embedded servlet container.
TIP: See the {sc-spring-boot-autoconfigure}/web/ServerProperties.{sc-ext}[`ServerProperties`] class for a complete list. TIP: See the {spring-boot-autoconfigure-module-code}/web/ServerProperties.java[`ServerProperties`] class for a complete list.
@ -2748,7 +2748,7 @@ If the preceding customization techniques are too limited, you can register the
Setters are provided for many configuration options. Setters are provided for many configuration options.
Several protected method "`hooks`" are also provided should you need to do something more exotic. Several protected method "`hooks`" are also provided should you need to do something more exotic.
See the {dc-spring-boot}/web/servlet/server/ConfigurableServletWebServerFactory.{dc-ext}[source code documentation] for details. See the {spring-boot-module-api}/web/servlet/server/ConfigurableServletWebServerFactory.html[source code documentation] for details.
@ -2765,7 +2765,7 @@ When running a Spring Boot application that uses an embedded servlet container (
* Creating a custom `error.jsp` page does not override the default view for <<boot-features-error-handling,error handling>>. * Creating a custom `error.jsp` page does not override the default view for <<boot-features-error-handling,error handling>>.
<<boot-features-error-handling-custom-error-pages,Custom error pages>> should be used instead. <<boot-features-error-handling-custom-error-pages,Custom error pages>> should be used instead.
There is a {github-code}/spring-boot-samples/spring-boot-sample-web-jsp[JSP sample] so that you can see how to set things up. There is a {spring-boot-code}/spring-boot-samples/spring-boot-sample-web-jsp[JSP sample] so that you can see how to set things up.
@ -2797,7 +2797,7 @@ You can learn more about the resource configuration on the client side in the <<
If {spring-security}[Spring Security] is on the classpath, then web applications are secured by default. If {spring-security}[Spring Security] is on the classpath, then web applications are secured by default.
Spring Boot relies on Spring Securitys content-negotiation strategy to determine whether to use `httpBasic` or `formLogin`. Spring Boot relies on Spring Securitys content-negotiation strategy to determine whether to use `httpBasic` or `formLogin`.
To add method-level security to a web application, you can also add `@EnableGlobalMethodSecurity` with your desired settings. To add method-level security to a web application, you can also add `@EnableGlobalMethodSecurity` with your desired settings.
Additional information can be found in the {spring-security-reference}#jc-method[Spring Security Reference Guide]. Additional information can be found in the {spring-security-docs}#jc-method[Spring Security Reference Guide].
The default `UserDetailsService` has a single user. The user name is `user`, and the password is random and is printed at INFO level when the application starts, as shown in the following example: The default `UserDetailsService` has a single user. The user name is `user`, and the password is random and is printed at INFO level when the application starts, as shown in the following example:
@ -2813,7 +2813,7 @@ You can change the username and password by providing a `spring.security.user.na
The basic features you get by default in a web application are: The basic features you get by default in a web application are:
* A `UserDetailsService` (or `ReactiveUserDetailsService` in case of a WebFlux application) bean with in-memory store and a single user with a generated password (see {dc-spring-boot}/autoconfigure/security/SecurityProperties.User.html[`SecurityProperties.User`] for the properties of the user). * A `UserDetailsService` (or `ReactiveUserDetailsService` in case of a WebFlux application) bean with in-memory store and a single user with a generated password (see {spring-boot-module-api}/autoconfigure/security/SecurityProperties.User.html[`SecurityProperties.User`] for the properties of the user).
* Form-based login or HTTP Basic security (depending on the `Accept` header in the request) for the entire application (including actuator endpoints if actuator is on the classpath). * Form-based login or HTTP Basic security (depending on the `Accept` header in the request) for the entire application (including actuator endpoints if actuator is on the classpath).
* A `DefaultAuthenticationEventPublisher` for publishing authentication events. * A `DefaultAuthenticationEventPublisher` for publishing authentication events.
@ -2828,7 +2828,7 @@ The default security configuration is implemented in `SecurityAutoConfiguration`
To switch off the default web application security configuration completely, you can add a bean of type `WebSecurityConfigurerAdapter` (doing so does not disable the `UserDetailsService` configuration or Actuator's security). To switch off the default web application security configuration completely, you can add a bean of type `WebSecurityConfigurerAdapter` (doing so does not disable the `UserDetailsService` configuration or Actuator's security).
To also switch off the `UserDetailsService` configuration, you can add a bean of type `UserDetailsService`, `AuthenticationProvider`, or `AuthenticationManager`. To also switch off the `UserDetailsService` configuration, you can add a bean of type `UserDetailsService`, `AuthenticationProvider`, or `AuthenticationManager`.
There are several secure applications in the {github-code}/spring-boot-samples/[Spring Boot samples] to get you started with common use cases. There are several secure applications in the {spring-boot-code}/spring-boot-samples/[Spring Boot samples] to get you started with common use cases.
Access rules can be overridden by adding a custom `WebSecurityConfigurerAdapter`. Access rules can be overridden by adding a custom `WebSecurityConfigurerAdapter`.
Spring Boot provides convenience methods that can be used to override access rules for actuator endpoints and static resources. Spring Boot provides convenience methods that can be used to override access rules for actuator endpoints and static resources.
@ -3003,7 +3003,7 @@ This means that the actuator endpoints that require a `POST` (shutdown and logge
NOTE: We recommend disabling CSRF protection completely only if you are creating a service that is used by non-browser clients. NOTE: We recommend disabling CSRF protection completely only if you are creating a service that is used by non-browser clients.
Additional information about CSRF protection can be found in the {spring-security-reference}#csrf[Spring Security Reference Guide]. Additional information about CSRF protection can be found in the {spring-security-docs}#csrf[Spring Security Reference Guide].
@ -3102,7 +3102,7 @@ TIP: You often do not need to specify the `driver-class-name`, since Spring Boot
NOTE: For a pooling `DataSource` to be created, we need to be able to verify that a valid `Driver` class is available, so we check for that before doing anything. NOTE: For a pooling `DataSource` to be created, we need to be able to verify that a valid `Driver` class is available, so we check for that before doing anything.
In other words, if you set `spring.datasource.driver-class-name=com.mysql.jdbc.Driver`, then that class has to be loadable. In other words, if you set `spring.datasource.driver-class-name=com.mysql.jdbc.Driver`, then that class has to be loadable.
See {sc-spring-boot-autoconfigure}/jdbc/DataSourceProperties.{sc-ext}[`DataSourceProperties`] for more of the supported options. See {spring-boot-autoconfigure-module-code}/jdbc/DataSourceProperties.java[`DataSourceProperties`] for more of the supported options.
These are the standard options that work regardless of the actual implementation. These are the standard options that work regardless of the actual implementation.
It is also possible to fine-tune implementation-specific settings by using their respective prefix (`+spring.datasource.hikari.*+`, `+spring.datasource.tomcat.*+`, and `+spring.datasource.dbcp2.*+`). It is also possible to fine-tune implementation-specific settings by using their respective prefix (`+spring.datasource.hikari.*+`, `+spring.datasource.tomcat.*+`, and `+spring.datasource.dbcp2.*+`).
Refer to the documentation of the connection pool implementation you are using for more details. Refer to the documentation of the connection pool implementation you are using for more details.
@ -3253,9 +3253,9 @@ See the "`<<howto.adoc#howto-separate-entity-definitions-from-spring-configurati
JPA queries are created automatically from your method names. JPA queries are created automatically from your method names.
For example, a `CityRepository` interface might declare a `findAllByState(String state)` method to find all the cities in a given state. For example, a `CityRepository` interface might declare a `findAllByState(String state)` method to find all the cities in a given state.
For more complex queries, you can annotate your method with Spring Data's {spring-data-javadoc}/repository/Query.html[`Query`] annotation. For more complex queries, you can annotate your method with Spring Data's {spring-data-jpa-api}/repository/Query.html[`Query`] annotation.
Spring Data repositories usually extend from the {spring-data-commons-javadoc}/repository/Repository.html[`Repository`] or {spring-data-commons-javadoc}/repository/CrudRepository.html[`CrudRepository`] interfaces. Spring Data repositories usually extend from the {spring-data-commons-api}/repository/Repository.html[`Repository`] or {spring-data-commons-javadoc}/repository/CrudRepository.html[`CrudRepository`] interfaces.
If you use auto-configuration, repositories are searched from the package containing your main configuration class (the one annotated with `@EnableAutoConfiguration` or `@SpringBootApplication`) down. If you use auto-configuration, repositories are searched from the package containing your main configuration class (the one annotated with `@EnableAutoConfiguration` or `@SpringBootApplication`) down.
The following example shows a typical Spring Data repository interface definition: The following example shows a typical Spring Data repository interface definition:
@ -3315,7 +3315,7 @@ There is also a `spring.jpa.generate-ddl` flag, but it is not used if Hibernate
[[boot-features-jpa-in-web-environment]] [[boot-features-jpa-in-web-environment]]
==== Open EntityManager in View ==== Open EntityManager in View
If you are running a web application, Spring Boot by default registers {spring-javadoc}/orm/jpa/support/OpenEntityManagerInViewInterceptor.{dc-ext}[`OpenEntityManagerInViewInterceptor`] to apply the "`Open EntityManager in View`" pattern, to allow for lazy loading in web views. If you are running a web application, Spring Boot by default registers {spring-framework-api}/orm/jpa/support/OpenEntityManagerInViewInterceptor.html[`OpenEntityManagerInViewInterceptor`] to apply the "`Open EntityManager in View`" pattern, to allow for lazy loading in web views.
If you do not want this behavior, you should set `spring.jpa.open-in-view` to `false` in your `application.properties`. If you do not want this behavior, you should set `spring.jpa.open-in-view` to `false` in your `application.properties`.
@ -3363,7 +3363,7 @@ Both the commercial and open source editions can be used with Spring Boot.
==== Code Generation ==== Code Generation
In order to use jOOQ type-safe queries, you need to generate Java classes from your database schema. In order to use jOOQ type-safe queries, you need to generate Java classes from your database schema.
You can follow the instructions in the {jooq-manual}/#jooq-in-7-steps-step3[jOOQ user manual]. You can follow the instructions in the {jooq-docs}/#jooq-in-7-steps-step3[jOOQ user manual].
If you use the `jooq-codegen-maven` plugin and you also use the `spring-boot-starter-parent` "`parent POM`", you can safely omit the plugin's `<version>` tag. If you use the `jooq-codegen-maven` plugin and you also use the `spring-boot-starter-parent` "`parent POM`", you can safely omit the plugin's `<version>` tag.
You can also use Spring Boot-defined version variables (such as `h2.version`) to declare the plugin's database dependency. The following listing shows an example: You can also use Spring Boot-defined version variables (such as `h2.version`) to declare the plugin's database dependency. The following listing shows an example:
@ -3461,15 +3461,15 @@ You can also create your own `org.jooq.Configuration` `@Bean` if you want to tak
== Working with NoSQL Technologies == Working with NoSQL Technologies
Spring Data provides additional projects that help you access a variety of NoSQL technologies, including: Spring Data provides additional projects that help you access a variety of NoSQL technologies, including:
* https://projects.spring.io/spring-data-mongodb/[MongoDB] * https://spring.io/projects/spring-data-mongodb[MongoDB]
* https://projects.spring.io/spring-data-neo4j/[Neo4J] * https://spring.io/projects/spring-data-neo4j[Neo4J]
* https://github.com/spring-projects/spring-data-elasticsearch/[Elasticsearch] * https://spring.io/projects/spring-data-elasticsearch[Elasticsearch]
* https://projects.spring.io/spring-data-solr/[Solr] * https://spring.io/projects/spring-data-solr[Solr]
* https://projects.spring.io/spring-data-redis/[Redis] * https://spring.io/projects/spring-data-redis[Redis]
* https://projects.spring.io/spring-data-gemfire/[Gemfire] or https://projects.spring.io/spring-data-geode/[Geode] * https://spring.io/projects/spring-data-gemfire[Gemfire] or https://spring.io/projects/spring-data-geode[Geode]
* https://projects.spring.io/spring-data-cassandra/[Cassandra] * https://spring.io/projects/spring-data-cassandra[Cassandra]
* https://projects.spring.io/spring-data-couchbase/[Couchbase] * https://spring.io/projects/spring-data-couchbase[Couchbase]
* https://projects.spring.io/spring-data-ldap/[LDAP] * https://spring.io/projects/spring-data-ldap[LDAP]
Spring Boot provides auto-configuration for Redis, MongoDB, Neo4j, Elasticsearch, Solr Cassandra, Couchbase, and LDAP. Spring Boot provides auto-configuration for Redis, MongoDB, Neo4j, Elasticsearch, Solr Cassandra, Couchbase, and LDAP.
You can make use of the other projects, but you must configure them yourself. You can make use of the other projects, but you must configure them yourself.
@ -3594,7 +3594,7 @@ The auto-configuration configures this factory automatically if Netty is availab
[[boot-features-mongo-template]] [[boot-features-mongo-template]]
==== MongoTemplate ==== MongoTemplate
{spring-data-mongo}[Spring Data MongoDB] provides a {spring-data-mongo-javadoc}/core/MongoTemplate.html[`MongoTemplate`] class that is very similar in its design to Spring's `JdbcTemplate`. {spring-data-mongodb}[Spring Data MongoDB] provides a {spring-data-mongodb-api}/core/MongoTemplate.html[`MongoTemplate`] class that is very similar in its design to Spring's `JdbcTemplate`.
As with `JdbcTemplate`, Spring Boot auto-configures a bean for you to inject the template, as follows: As with `JdbcTemplate`, Spring Boot auto-configures a bean for you to inject the template, as follows:
[source,java,indent=0] [source,java,indent=0]
@ -3618,11 +3618,12 @@ As with `JdbcTemplate`, Spring Boot auto-configures a bean for you to inject the
} }
---- ----
See the https://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb/core/MongoOperations.html[`MongoOperations` Javadoc] for complete details. See the {spring-data-mongodb-javadoc}/core/MongoOperations.html[`MongoOperations` Javadoc] for complete details.
[[boot-features-spring-data-mongo-repositories]] [[boot-features-spring-data-mongo-repositories]]
[[boot-features-spring-data-mongodb-repositories]]
==== Spring Data MongoDB Repositories ==== Spring Data MongoDB Repositories
Spring Data includes repository support for MongoDB. Spring Data includes repository support for MongoDB.
As with the JPA repositories discussed earlier, the basic principle is that queries are constructed automatically, based on method names. As with the JPA repositories discussed earlier, the basic principle is that queries are constructed automatically, based on method names.
@ -3648,7 +3649,7 @@ You could take the JPA example from earlier and, assuming that `City` is now a M
TIP: You can customize document scanning locations by using the `@EntityScan` annotation. TIP: You can customize document scanning locations by using the `@EntityScan` annotation.
TIP: For complete details of Spring Data MongoDB, including its rich object mapping technologies, refer to its https://projects.spring.io/spring-data-mongodb/[reference documentation]. TIP: For complete details of Spring Data MongoDB, including its rich object mapping technologies, refer to its {spring-data-mongodb}[reference documentation].
@ -4130,7 +4131,7 @@ To configure the server, add a dependency to `com.unboundid:unboundid-ldapsdk` a
spring.ldap.embedded.base-dn=dc=spring,dc=io spring.ldap.embedded.base-dn=dc=spring,dc=io
---- ----
NOTE [NOTE]
==== ====
It is possible to define multiple base-dn values, however, since distinguished names usually contain commas, they must be defined using the correct notation. It is possible to define multiple base-dn values, however, since distinguished names usually contain commas, they must be defined using the correct notation.
@ -4194,7 +4195,7 @@ At its core, the abstraction applies caching to methods, thus reducing the numbe
The caching logic is applied transparently, without any interference to the invoker. The caching logic is applied transparently, without any interference to the invoker.
Spring Boot auto-configures the cache infrastructure as long as caching support is enabled via the `@EnableCaching` annotation. Spring Boot auto-configures the cache infrastructure as long as caching support is enabled via the `@EnableCaching` annotation.
NOTE: Check the {spring-reference}integration.html#cache[relevant section] of the Spring Framework reference for more details. NOTE: Check the {spring-framework-docs}integration.html#cache[relevant section] of the Spring Framework reference for more details.
In a nutshell, adding caching to an operation of your service is as easy as adding the relevant annotation to its method, as shown in the following example: In a nutshell, adding caching to an operation of your service is as easy as adding the relevant annotation to its method, as shown in the following example:
@ -4229,7 +4230,7 @@ When you have made up your mind about the cache provider to use, please make sur
Nearly all providers require you to explicitly configure every cache that you use in the application. Nearly all providers require you to explicitly configure every cache that you use in the application.
Some offer a way to customize the default caches defined by the `spring.cache.cache-names` property. Some offer a way to customize the default caches defined by the `spring.cache.cache-names` property.
TIP: It is also possible to transparently {spring-reference}integration.html#cache-annotations-put[update] or {spring-reference}integration.html#cache-annotations-evict[evict] data from the cache. TIP: It is also possible to transparently {spring-framework-docs}integration.html#cache-annotations-put[update] or {spring-framework-docs}integration.html#cache-annotations-evict[evict] data from the cache.
@ -4237,7 +4238,7 @@ TIP: It is also possible to transparently {spring-reference}integration.html#cac
=== Supported Cache Providers === Supported Cache Providers
The cache abstraction does not provide an actual store and relies on abstraction materialized by the `org.springframework.cache.Cache` and `org.springframework.cache.CacheManager` interfaces. The cache abstraction does not provide an actual store and relies on abstraction materialized by the `org.springframework.cache.Cache` and `org.springframework.cache.CacheManager` interfaces.
If you have not defined a bean of type `CacheManager` or a `CacheResolver` named `cacheResolver` (see {spring-javadoc}/cache/annotation/CachingConfigurer.html[`CachingConfigurer`]), Spring Boot tries to detect the following providers (in the indicated order): If you have not defined a bean of type `CacheManager` or a `CacheResolver` named `cacheResolver` (see {spring-framework-api}/cache/annotation/CachingConfigurer.html[`CachingConfigurer`]), Spring Boot tries to detect the following providers (in the indicated order):
. <<boot-features-caching-provider-generic,Generic>> . <<boot-features-caching-provider-generic,Generic>>
. <<boot-features-caching-provider-jcache,JCache (JSR-107)>> (EhCache 3, Hazelcast, Infinispan, and others) . <<boot-features-caching-provider-jcache,JCache (JSR-107)>> (EhCache 3, Hazelcast, Infinispan, and others)
@ -4489,7 +4490,7 @@ Spring Boot also has support for Apache Kafka.
=== JMS === JMS
The `javax.jms.ConnectionFactory` interface provides a standard method of creating a `javax.jms.Connection` for interacting with a JMS broker. The `javax.jms.ConnectionFactory` interface provides a standard method of creating a `javax.jms.Connection` for interacting with a JMS broker.
Although Spring needs a `ConnectionFactory` to work with JMS, you generally need not use it directly yourself and can instead rely on higher level messaging abstractions. Although Spring needs a `ConnectionFactory` to work with JMS, you generally need not use it directly yourself and can instead rely on higher level messaging abstractions.
(See the {spring-reference}integration.html#jms[relevant section] of the Spring Framework reference documentation for details.) (See the {spring-framework-docs}integration.html#jms[relevant section] of the Spring Framework reference documentation for details.)
Spring Boot also auto-configures the necessary infrastructure to send and receive messages. Spring Boot also auto-configures the necessary infrastructure to send and receive messages.
@ -4526,7 +4527,7 @@ If you'd rather use native pooling, you can do so by adding a dependency to `org
spring.activemq.pool.max-connections=50 spring.activemq.pool.max-connections=50
---- ----
TIP: See {sc-spring-boot-autoconfigure}/jms/activemq/ActiveMQProperties.{sc-ext}[`ActiveMQProperties`] for more of the supported options. TIP: See {spring-boot-autoconfigure-module-code}/jms/activemq/ActiveMQProperties.java[`ActiveMQProperties`] for more of the supported options.
You can also register an arbitrary number of beans that implement `ActiveMQConnectionFactoryCustomizer` for more advanced customizations. You can also register an arbitrary number of beans that implement `ActiveMQConnectionFactoryCustomizer` for more advanced customizations.
By default, ActiveMQ creates a destination if it does not yet exist so that destinations are resolved against their provided names. By default, ActiveMQ creates a destination if it does not yet exist so that destinations are resolved against their provided names.
@ -4572,7 +4573,7 @@ If you'd rather use native pooling, you can do so by adding a dependency to `org
spring.artemis.pool.max-connections=50 spring.artemis.pool.max-connections=50
---- ----
See {sc-spring-boot-autoconfigure}/jms/artemis/ArtemisProperties.{sc-ext}[`ArtemisProperties`] for more supported options. See {spring-boot-autoconfigure-module-code}/jms/artemis/ArtemisProperties.java[`ArtemisProperties`] for more supported options.
No JNDI lookup is involved, and destinations are resolved against their names, using either the `name` attribute in the Artemis configuration or the names provided through configuration. No JNDI lookup is involved, and destinations are resolved against their names, using either the `name` attribute in the Artemis configuration or the names provided through configuration.
@ -4615,7 +4616,7 @@ Spring's `JmsTemplate` is auto-configured, and you can autowire it directly into
} }
---- ----
NOTE: {spring-javadoc}/jms/core/JmsMessagingTemplate.{dc-ext}[`JmsMessagingTemplate`] can be injected in a similar manner. NOTE: {spring-framework-api}/jms/core/JmsMessagingTemplate.html[`JmsMessagingTemplate`] can be injected in a similar manner.
If a `DestinationResolver` or a `MessageConverter` bean is defined, it is associated automatically to the auto-configured `JmsTemplate`. If a `DestinationResolver` or a `MessageConverter` bean is defined, it is associated automatically to the auto-configured `JmsTemplate`.
@ -4648,7 +4649,7 @@ The following component creates a listener endpoint on the `someQueue` destinati
} }
---- ----
TIP: See {spring-javadoc}/jms/annotation/EnableJms.{dc-ext}[the Javadoc of `@EnableJms`] for more details. TIP: See {spring-framework-api}/jms/annotation/EnableJms.html[the Javadoc of `@EnableJms`] for more details.
If you need to create more `JmsListenerContainerFactory` instances or if you want to override the default, Spring Boot provides a `DefaultJmsListenerContainerFactoryConfigurer` that you can use to initialize a `DefaultJmsListenerContainerFactory` with the same settings as the one that is auto-configured. If you need to create more `JmsListenerContainerFactory` instances or if you want to override the default, Spring Boot provides a `DefaultJmsListenerContainerFactoryConfigurer` that you can use to initialize a `DefaultJmsListenerContainerFactory` with the same settings as the one that is auto-configured.
@ -4715,7 +4716,7 @@ For example, you might declare the following section in `application.properties`
---- ----
If a `ConnectionNameStrategy` bean exists in the context, it will be automatically used to name connections created by the auto-configured `ConnectionFactory`. If a `ConnectionNameStrategy` bean exists in the context, it will be automatically used to name connections created by the auto-configured `ConnectionFactory`.
See {sc-spring-boot-autoconfigure}/amqp/RabbitProperties.{sc-ext}[`RabbitProperties`] for more of the supported options. See {spring-boot-autoconfigure-module-code}/amqp/RabbitProperties.java[`RabbitProperties`] for more of the supported options.
TIP: See https://spring.io/blog/2010/06/14/understanding-amqp-the-protocol-used-by-rabbitmq/[Understanding AMQP, the protocol used by RabbitMQ] for more details. TIP: See https://spring.io/blog/2010/06/14/understanding-amqp-the-protocol-used-by-rabbitmq/[Understanding AMQP, the protocol used by RabbitMQ] for more details.
@ -4749,7 +4750,7 @@ Spring's `AmqpTemplate` and `AmqpAdmin` are auto-configured, and you can autowir
} }
---- ----
NOTE: {spring-amqp-javadoc}/rabbit/core/RabbitMessagingTemplate.{dc-ext}[`RabbitMessagingTemplate`] can be injected in a similar manner. NOTE: {spring-amqp-api}/rabbit/core/RabbitMessagingTemplate.html[`RabbitMessagingTemplate`] can be injected in a similar manner.
If a `MessageConverter` bean is defined, it is associated automatically to the auto-configured `AmqpTemplate`. If a `MessageConverter` bean is defined, it is associated automatically to the auto-configured `AmqpTemplate`.
If necessary, any `org.springframework.amqp.core.Queue` that is defined as a bean is automatically used to declare a corresponding queue on the RabbitMQ instance. If necessary, any `org.springframework.amqp.core.Queue` that is defined as a bean is automatically used to declare a corresponding queue on the RabbitMQ instance.
@ -4788,7 +4789,7 @@ The following sample component creates a listener endpoint on the `someQueue` qu
} }
---- ----
TIP: See {spring-amqp-javadoc}/rabbit/annotation/EnableRabbit.{dc-ext}[the Javadoc of `@EnableRabbit`] for more details. TIP: See {spring-amqp-api}/rabbit/annotation/EnableRabbit.html[the Javadoc of `@EnableRabbit`] for more details.
If you need to create more `RabbitListenerContainerFactory` instances or if you want to override the default, Spring Boot provides a `SimpleRabbitListenerContainerFactoryConfigurer` and a `DirectRabbitListenerContainerFactoryConfigurer` that you can use to initialize a `SimpleRabbitListenerContainerFactory` and a `DirectRabbitListenerContainerFactory` with the same settings as the factories used by the auto-configuration. If you need to create more `RabbitListenerContainerFactory` instances or if you want to override the default, Spring Boot provides a `SimpleRabbitListenerContainerFactoryConfigurer` and a `DirectRabbitListenerContainerFactoryConfigurer` that you can use to initialize a `SimpleRabbitListenerContainerFactory` and a `DirectRabbitListenerContainerFactory` with the same settings as the factories used by the auto-configuration.
@ -4857,7 +4858,7 @@ For example, you might declare the following section in `application.properties`
TIP: To create a topic on startup, add a bean of type `NewTopic`. TIP: To create a topic on startup, add a bean of type `NewTopic`.
If the topic already exists, the bean is ignored. If the topic already exists, the bean is ignored.
See {sc-spring-boot-autoconfigure}/kafka/KafkaProperties.{sc-ext}[`KafkaProperties`] for more supported options. See {spring-boot-autoconfigure-module-code}/kafka/KafkaProperties.java[`KafkaProperties`] for more supported options.
@ -4985,7 +4986,7 @@ IMPORTANT: Properties set in this way override any configuration item that Sprin
[[boot-features-resttemplate]] [[boot-features-resttemplate]]
== Calling REST Services with `RestTemplate` == Calling REST Services with `RestTemplate`
If you need to call remote REST services from your application, you can use the Spring Framework's {spring-javadoc}/web/client/RestTemplate.html[`RestTemplate`] class. If you need to call remote REST services from your application, you can use the Spring Framework's {spring-framework-api}/web/client/RestTemplate.html[`RestTemplate`] class.
Since `RestTemplate` instances often need to be customized before being used, Spring Boot does not provide any single auto-configured `RestTemplate` bean. Since `RestTemplate` instances often need to be customized before being used, Spring Boot does not provide any single auto-configured `RestTemplate` bean.
It does, however, auto-configure a `RestTemplateBuilder`, which can be used to create `RestTemplate` instances when needed. It does, however, auto-configure a `RestTemplateBuilder`, which can be used to create `RestTemplate` instances when needed.
The auto-configured `RestTemplateBuilder` ensures that sensible `HttpMessageConverters` are applied to `RestTemplate` instances. The auto-configured `RestTemplateBuilder` ensures that sensible `HttpMessageConverters` are applied to `RestTemplate` instances.
@ -5041,7 +5042,7 @@ Doing so switches off the auto-configuration of a `RestTemplateBuilder` and prev
== Calling REST Services with `WebClient` == Calling REST Services with `WebClient`
If you have Spring WebFlux on your classpath, you can also choose to use `WebClient` to call remote REST services. If you have Spring WebFlux on your classpath, you can also choose to use `WebClient` to call remote REST services.
Compared to `RestTemplate`, this client has a more functional feel and is fully reactive. Compared to `RestTemplate`, this client has a more functional feel and is fully reactive.
You can learn more about the `WebClient` in the dedicated {spring-reference}web-reactive.html#webflux-client[section in the Spring Framework docs]. You can learn more about the `WebClient` in the dedicated {spring-framework-docs}web-reactive.html#webflux-client[section in the Spring Framework docs].
Spring Boot creates and pre-configures a `WebClient.Builder` for you; it is strongly advised to inject it in your components and use it to create `WebClient` instances. Spring Boot creates and pre-configures a `WebClient.Builder` for you; it is strongly advised to inject it in your components and use it to create `WebClient` instances.
Spring Boot is configuring that builder to share HTTP resources, reflect codecs setup in the same fashion as the server ones (see <<boot-features-webflux-httpcodecs,WebFlux HTTP codecs auto-configuration>>), and more. Spring Boot is configuring that builder to share HTTP resources, reflect codecs setup in the same fashion as the server ones (see <<boot-features-webflux-httpcodecs,WebFlux HTTP codecs auto-configuration>>), and more.
@ -5082,7 +5083,7 @@ Developers can override the resource configuration for Jetty and Reactor Netty b
If you wish to override that choice for the client, you can define your own `ClientHttpConnector` bean and have full control over the client configuration. If you wish to override that choice for the client, you can define your own `ClientHttpConnector` bean and have full control over the client configuration.
You can learn more about the {spring-reference}web-reactive.html#webflux-client-builder[`WebClient` configuration options in the Spring Framework reference documentation]. You can learn more about the {spring-framework-docs}web-reactive.html#webflux-client-builder[`WebClient` configuration options in the Spring Framework reference documentation].
@ -5129,11 +5130,11 @@ For instance, the following service triggers the validation of the first argumen
== Sending Email == Sending Email
The Spring Framework provides an easy abstraction for sending email by using the `JavaMailSender` interface, and Spring Boot provides auto-configuration for it as well as a starter module. The Spring Framework provides an easy abstraction for sending email by using the `JavaMailSender` interface, and Spring Boot provides auto-configuration for it as well as a starter module.
TIP: See the {spring-reference}integration.html#mail[reference documentation] for a detailed explanation of how you can use `JavaMailSender`. TIP: See the {spring-framework-docs}integration.html#mail[reference documentation] for a detailed explanation of how you can use `JavaMailSender`.
If `spring.mail.host` and the relevant libraries (as defined by `spring-boot-starter-mail`) are available, a default `JavaMailSender` is created if none exists. If `spring.mail.host` and the relevant libraries (as defined by `spring-boot-starter-mail`) are available, a default `JavaMailSender` is created if none exists.
The sender can be further customized by configuration items from the `spring.mail` namespace. The sender can be further customized by configuration items from the `spring.mail` namespace.
See {sc-spring-boot-autoconfigure}/mail/MailProperties.{sc-ext}[`MailProperties`] for more details. See {spring-boot-autoconfigure-module-code}/mail/MailProperties.java[`MailProperties`] for more details.
In particular, certain default timeout values are infinite, and you may want to change that to avoid having a thread blocked by an unresponsive mail server, as shown in the following example: In particular, certain default timeout values are infinite, and you may want to change that to avoid having a thread blocked by an unresponsive mail server, as shown in the following example:
@ -5176,7 +5177,7 @@ Spring Boot auto-configures Atomikos and ensures that appropriate `depends-on` s
By default, Atomikos transaction logs are written to a `transaction-logs` directory in your application's home directory (the directory in which your application jar file resides). By default, Atomikos transaction logs are written to a `transaction-logs` directory in your application's home directory (the directory in which your application jar file resides).
You can customize the location of this directory by setting a `spring.jta.log-dir` property in your `application.properties` file. You can customize the location of this directory by setting a `spring.jta.log-dir` property in your `application.properties` file.
Properties starting with `spring.jta.atomikos.properties` can also be used to customize the Atomikos `UserTransactionServiceImp`. Properties starting with `spring.jta.atomikos.properties` can also be used to customize the Atomikos `UserTransactionServiceImp`.
See the {dc-spring-boot}/jta/atomikos/AtomikosProperties.{dc-ext}[`AtomikosProperties` Javadoc] for complete details. See the {spring-boot-module-api}/jta/atomikos/AtomikosProperties.html[`AtomikosProperties` Javadoc] for complete details.
NOTE: To ensure that multiple transaction managers can safely coordinate the same resource managers, each Atomikos instance must be configured with a unique ID. By default, this ID is the IP address of the machine on which Atomikos is running. NOTE: To ensure that multiple transaction managers can safely coordinate the same resource managers, each Atomikos instance must be configured with a unique ID. By default, this ID is the IP address of the machine on which Atomikos is running.
To ensure uniqueness in production, you should configure the `spring.jta.transaction-manager-id` property with a different value for each instance of your application. To ensure uniqueness in production, you should configure the `spring.jta.transaction-manager-id` property with a different value for each instance of your application.
@ -5241,11 +5242,11 @@ The following example shows how to inject `ConnectionFactory` instances:
[[boot-features-jta-supporting-alternative-embedded]] [[boot-features-jta-supporting-alternative-embedded]]
=== Supporting an Alternative Embedded Transaction Manager === Supporting an Alternative Embedded Transaction Manager
The {sc-spring-boot}/jms/XAConnectionFactoryWrapper.{sc-ext}[`XAConnectionFactoryWrapper`] and {sc-spring-boot}/jdbc/XADataSourceWrapper.{sc-ext}[`XADataSourceWrapper`] interfaces can be used to support alternative embedded transaction managers. The {spring-boot-module-code}/jms/XAConnectionFactoryWrapper.java[`XAConnectionFactoryWrapper`] and {spring-boot-module-code}/jdbc/XADataSourceWrapper.java[`XADataSourceWrapper`] interfaces can be used to support alternative embedded transaction managers.
The interfaces are responsible for wrapping `XAConnectionFactory` and `XADataSource` beans and exposing them as regular `ConnectionFactory` and `DataSource` beans, which transparently enroll in the distributed transaction. The interfaces are responsible for wrapping `XAConnectionFactory` and `XADataSource` beans and exposing them as regular `ConnectionFactory` and `DataSource` beans, which transparently enroll in the distributed transaction.
DataSource and JMS auto-configuration use JTA variants, provided you have a `JtaTransactionManager` bean and appropriate XA wrapper beans registered within your `ApplicationContext`. DataSource and JMS auto-configuration use JTA variants, provided you have a `JtaTransactionManager` bean and appropriate XA wrapper beans registered within your `ApplicationContext`.
The {sc-spring-boot}/jta/bitronix/BitronixXAConnectionFactoryWrapper.{sc-ext}[BitronixXAConnectionFactoryWrapper] and {sc-spring-boot}/jta/bitronix/BitronixXADataSourceWrapper.{sc-ext}[BitronixXADataSourceWrapper] provide good examples of how to write XA wrappers. The {spring-boot-module-code}/jta/bitronix/BitronixXAConnectionFactoryWrapper.java[BitronixXAConnectionFactoryWrapper] and {spring-boot-module-code}/jta/bitronix/BitronixXADataSourceWrapper.java[BitronixXADataSourceWrapper] provide good examples of how to write XA wrappers.
@ -5396,7 +5397,7 @@ If `spring-integration-jdbc` is available, the default database schema can be cr
spring.integration.jdbc.initialize-schema=always spring.integration.jdbc.initialize-schema=always
---- ----
See the {sc-spring-boot-autoconfigure}/integration/IntegrationAutoConfiguration.{sc-ext}[`IntegrationAutoConfiguration`] and {sc-spring-boot-autoconfigure}/integration/IntegrationProperties.{sc-ext}[`IntegrationProperties`] classes for more details. See the {spring-boot-autoconfigure-module-code}/integration/IntegrationAutoConfiguration.java[`IntegrationAutoConfiguration`] and {spring-boot-autoconfigure-module-code}/integration/IntegrationProperties.java[`IntegrationProperties`] classes for more details.
By default, if a Micrometer `meterRegistry` bean is present, Spring Integration metrics will be managed by Micrometer. By default, if a Micrometer `meterRegistry` bean is present, Spring Integration metrics will be managed by Micrometer.
If you wish to use legacy Spring Integration metrics, add a `DefaultMetricsFactory` bean to the application context. If you wish to use legacy Spring Integration metrics, add a `DefaultMetricsFactory` bean to the application context.
@ -5419,7 +5420,7 @@ When building a reactive web application, the following stores can be auto-confi
* MongoDB * MongoDB
If a single Spring Session module is present on the classpath, Spring Boot uses that store implementation automatically. If a single Spring Session module is present on the classpath, Spring Boot uses that store implementation automatically.
If you have more than one implementation, you must choose the {sc-spring-boot-autoconfigure}/session/StoreType.{sc-ext}[`StoreType`] that you wish to use to store the sessions. If you have more than one implementation, you must choose the {spring-boot-autoconfigure-module-code}/session/StoreType.java[`StoreType`] that you wish to use to store the sessions.
For instance, to use JDBC as the back-end store, you can configure your application as follows: For instance, to use JDBC as the back-end store, you can configure your application as follows:
[source,properties,indent=0] [source,properties,indent=0]
@ -5451,7 +5452,7 @@ Any of your beans that are annotated with Spring JMX annotations (`@ManagedResou
If your platform provides a standard `MBeanServer`, Spring Boot will use that and default to the VM `MBeanServer` if necessary. If your platform provides a standard `MBeanServer`, Spring Boot will use that and default to the VM `MBeanServer` if necessary.
If all that fails, a new `MBeanServer` will be created. If all that fails, a new `MBeanServer` will be created.
See the {sc-spring-boot-autoconfigure}/jmx/JmxAutoConfiguration.{sc-ext}[`JmxAutoConfiguration`] class for more details. See the {spring-boot-autoconfigure-module-code}/jmx/JmxAutoConfiguration.java[`JmxAutoConfiguration`] class for more details.
@ -5469,7 +5470,7 @@ Most developers use the `spring-boot-starter-test` "`Starter`", which imports bo
The `spring-boot-starter-test` "`Starter`" (in the `test` `scope`) contains the following provided libraries: The `spring-boot-starter-test` "`Starter`" (in the `test` `scope`) contains the following provided libraries:
* https://junit.org[JUnit 4]: The de-facto standard for unit testing Java applications. * https://junit.org[JUnit 4]: The de-facto standard for unit testing Java applications.
* {spring-reference}testing.html#integration-testing[Spring Test] & Spring Boot Test: Utilities and integration test support for Spring Boot applications. * {spring-framework-docs}testing.html#integration-testing[Spring Test] & Spring Boot Test: Utilities and integration test support for Spring Boot applications.
* https://joel-costigliola.github.io/assertj/[AssertJ]: A fluent assertion library. * https://joel-costigliola.github.io/assertj/[AssertJ]: A fluent assertion library.
* https://github.com/hamcrest/JavaHamcrest[Hamcrest]: A library of matcher objects (also known as constraints or predicates). * https://github.com/hamcrest/JavaHamcrest[Hamcrest]: A library of matcher objects (also known as constraints or predicates).
* https://mockito.github.io[Mockito]: A Java mocking framework. * https://mockito.github.io[Mockito]: A Java mocking framework.
@ -5493,7 +5494,7 @@ It is useful to be able to perform integration testing without requiring deploym
The Spring Framework includes a dedicated test module for such integration testing. The Spring Framework includes a dedicated test module for such integration testing.
You can declare a dependency directly to `org.springframework:spring-test` or use the `spring-boot-starter-test` "`Starter`" to pull it in transitively. You can declare a dependency directly to `org.springframework:spring-test` or use the `spring-boot-starter-test` "`Starter`" to pull it in transitively.
If you have not used the `spring-test` module before, you should start by reading the {spring-reference}testing.html#testing[relevant section] of the Spring Framework reference documentation. If you have not used the `spring-test` module before, you should start by reading the {spring-framework-docs}testing.html#testing[relevant section] of the Spring Framework reference documentation.
@ -5600,14 +5601,14 @@ You can then import that class explicitly where it is required, as shown in the
---- ----
NOTE: If you directly use `@ComponentScan` (that is, not through `@SpringBootApplication`) you need to register the `TypeExcludeFilter` with it. NOTE: If you directly use `@ComponentScan` (that is, not through `@SpringBootApplication`) you need to register the `TypeExcludeFilter` with it.
See {dc-spring-boot}/context/TypeExcludeFilter.{dc-ext}[the Javadoc] for details. See {spring-boot-module-api}/context/TypeExcludeFilter.html[the Javadoc] for details.
[[boot-features-testing-spring-boot-applications-testing-with-mock-environment]] [[boot-features-testing-spring-boot-applications-testing-with-mock-environment]]
==== Testing with a mock environment ==== Testing with a mock environment
By default, `@SpringBootTest` does not start the server. By default, `@SpringBootTest` does not start the server.
If you have web endpoints that you want to test against this mock environment, you can additionally configure {spring-reference}/testing.html#spring-mvc-test-framework[`MockMvc`] as shown in the following example: If you have web endpoints that you want to test against this mock environment, you can additionally configure {spring-framework-docs}/testing.html#spring-mvc-test-framework[`MockMvc`] as shown in the following example:
[source,java,indent=0] [source,java,indent=0]
---- ----
@ -5616,7 +5617,7 @@ include::{code-examples}/test/web/MockMvcExampleTests.java[tag=test-mock-mvc]
TIP: If you want to focus only on the web layer and not start a complete `ApplicationContext`, consider <<boot-features-testing-spring-boot-applications-testing-autoconfigured-mvc-tests,using `@WebMvcTest` instead>>. TIP: If you want to focus only on the web layer and not start a complete `ApplicationContext`, consider <<boot-features-testing-spring-boot-applications-testing-autoconfigured-mvc-tests,using `@WebMvcTest` instead>>.
Alternatively, you can configure a {spring-reference}testing.html#webtestclient-tests[`WebTestClient`] as shown in the following example: Alternatively, you can configure a {spring-framework-docs}testing.html#webtestclient-tests[`WebTestClient`] as shown in the following example:
[source,java,indent=0] [source,java,indent=0]
---- ----
@ -5631,7 +5632,7 @@ If you need to start a full running server, we recommend that you use random por
If you use `@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)`, an available port is picked at random each time your test runs. If you use `@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)`, an available port is picked at random each time your test runs.
The `@LocalServerPort` annotation can be used to <<howto-discover-the-http-port-at-runtime,inject the actual port used>> into your test. The `@LocalServerPort` annotation can be used to <<howto-discover-the-http-port-at-runtime,inject the actual port used>> into your test.
For convenience, tests that need to make REST calls to the started server can additionally `@Autowire` a {spring-reference}testing.html#webtestclient-tests[`WebTestClient`], which resolves relative links to the running server and comes with a dedicated API for verifying responses, as shown in the following example: For convenience, tests that need to make REST calls to the started server can additionally `@Autowire` a {spring-framework-docs}testing.html#webtestclient-tests[`WebTestClient`], which resolves relative links to the running server and comes with a dedicated API for verifying responses, as shown in the following example:
[source,java,indent=0] [source,java,indent=0]
---- ----
@ -5724,7 +5725,7 @@ By the time the test is executed, the application context refresh has completed
We recommend using a `@Bean` method to create and configure the mock in this situation. We recommend using a `@Bean` method to create and configure the mock in this situation.
Additionally, you can use `@SpyBean` to wrap any existing bean with a Mockito `spy`. Additionally, you can use `@SpyBean` to wrap any existing bean with a Mockito `spy`.
See the {dc-spring-boot-test}/mock/mockito/SpyBean.{dc-ext}[Javadoc] for full details. See the {spring-boot-test-module-api}/mock/mockito/SpyBean.html[Javadoc] for full details.
NOTE: While Spring's test framework caches application contexts between tests and reuses a context for tests sharing the same configuration, the use of `@MockBean` or `@SpyBean` influences the cache key, which will most likely increase the number of contexts. NOTE: While Spring's test framework caches application contexts between tests and reuses a context for tests sharing the same configuration, the use of `@MockBean` or `@SpyBean` influences the cache key, which will most likely increase the number of contexts.
@ -5935,7 +5936,7 @@ TIP: Sometimes writing Spring MVC tests is not enough; Spring Boot can help you
[[boot-features-testing-spring-boot-applications-testing-autoconfigured-webflux-tests]] [[boot-features-testing-spring-boot-applications-testing-autoconfigured-webflux-tests]]
==== Auto-configured Spring WebFlux Tests ==== Auto-configured Spring WebFlux Tests
To test that {spring-reference}/web-reactive.html[Spring WebFlux] controllers are working as expected, you can use the `@WebFluxTest` annotation. To test that {spring-framework-docs}/web-reactive.html[Spring WebFlux] controllers are working as expected, you can use the `@WebFluxTest` annotation.
`@WebFluxTest` auto-configures the Spring WebFlux infrastructure and limits scanned beans to `@Controller`, `@ControllerAdvice`, `@JsonComponent`, `Converter`, `GenericConverter`, and `WebFluxConfigurer`. `@WebFluxTest` auto-configures the Spring WebFlux infrastructure and limits scanned beans to `@Controller`, `@ControllerAdvice`, `@JsonComponent`, `Converter`, `GenericConverter`, and `WebFluxConfigurer`.
Regular `@Component` beans are not scanned when the `@WebFluxTest` annotation is used. Regular `@Component` beans are not scanned when the `@WebFluxTest` annotation is used.
@ -5945,7 +5946,7 @@ TIP: If you need to register extra components, such as Jackson `Module`, you can
Often, `@WebFluxTest` is limited to a single controller and used in combination with the `@MockBean` annotation to provide mock implementations for required collaborators. Often, `@WebFluxTest` is limited to a single controller and used in combination with the `@MockBean` annotation to provide mock implementations for required collaborators.
`@WebFluxTest` also auto-configures {spring-reference}testing.html#webtestclient[`WebTestClient`], which offers a powerful way to quickly test WebFlux controllers without needing to start a full HTTP server. `@WebFluxTest` also auto-configures {spring-framework-docs}testing.html#webtestclient[`WebTestClient`], which offers a powerful way to quickly test WebFlux controllers without needing to start a full HTTP server.
TIP: You can also auto-configure `WebTestClient` in a non-`@WebFluxTest` (such as `@SpringBootTest`) by annotating it with `@AutoConfigureWebTestClient`. TIP: You can also auto-configure `WebTestClient` in a non-`@WebFluxTest` (such as `@SpringBootTest`) by annotating it with `@AutoConfigureWebTestClient`.
The following example shows a class that uses both `@WebFluxTest` and a `WebTestClient`: The following example shows a class that uses both `@WebFluxTest` and a `WebTestClient`:
@ -6006,7 +6007,7 @@ Regular `@Component` beans are not loaded into the `ApplicationContext`.
TIP: A list of the auto-configuration settings that are enabled by `@DataJpaTest` can be <<appendix-test-auto-configuration#test-auto-configuration,found in the appendix>>. TIP: A list of the auto-configuration settings that are enabled by `@DataJpaTest` can be <<appendix-test-auto-configuration#test-auto-configuration,found in the appendix>>.
By default, data JPA tests are transactional and roll back at the end of each test. By default, data JPA tests are transactional and roll back at the end of each test.
See the {spring-reference}testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details. See the {spring-framework-docs}testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
If that is not what you want, you can disable transaction management for a test or for the whole class as follows: If that is not what you want, you can disable transaction management for a test or for the whole class as follows:
[source,java,indent=0] [source,java,indent=0]
@ -6026,7 +6027,7 @@ If that is not what you want, you can disable transaction management for a test
} }
---- ----
Data JPA tests may also inject a {sc-spring-boot-test-autoconfigure}/orm/jpa/TestEntityManager.{sc-ext}[`TestEntityManager`] bean, which provides an alternative to the standard JPA `EntityManager` that is specifically designed for tests. Data JPA tests may also inject a {spring-boot-test-autoconfigure-module-code}/orm/jpa/TestEntityManager.java[`TestEntityManager`] bean, which provides an alternative to the standard JPA `EntityManager` that is specifically designed for tests.
If you want to use `TestEntityManager` outside of `@DataJpaTest` instances, you can also use the `@AutoConfigureTestEntityManager` annotation. If you want to use `TestEntityManager` outside of `@DataJpaTest` instances, you can also use the `@AutoConfigureTestEntityManager` annotation.
A `JdbcTemplate` is also available if you need that. The following example shows the `@DataJpaTest` annotation in use: A `JdbcTemplate` is also available if you need that. The following example shows the `@DataJpaTest` annotation in use:
@ -6085,7 +6086,7 @@ Regular `@Component` beans are not loaded into the `ApplicationContext`.
TIP: A list of the auto-configurations that are enabled by `@JdbcTest` can be <<appendix-test-auto-configuration#test-auto-configuration,found in the appendix>>. TIP: A list of the auto-configurations that are enabled by `@JdbcTest` can be <<appendix-test-auto-configuration#test-auto-configuration,found in the appendix>>.
By default, JDBC tests are transactional and roll back at the end of each test. By default, JDBC tests are transactional and roll back at the end of each test.
See the {spring-reference}testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details. See the {spring-framework-docs}testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
If that is not what you want, you can disable transaction management for a test or for the whole class, as follows: If that is not what you want, you can disable transaction management for a test or for the whole class, as follows:
[source,java,indent=0] [source,java,indent=0]
@ -6119,7 +6120,7 @@ Regular `@Component` beans are not loaded into the `ApplicationContext`.
TIP: A list of the auto-configurations that are enabled by `@DataJdbcTest` can be <<appendix-test-auto-configuration#test-auto-configuration,found in the appendix>>. TIP: A list of the auto-configurations that are enabled by `@DataJdbcTest` can be <<appendix-test-auto-configuration#test-auto-configuration,found in the appendix>>.
By default, Data JDBC tests are transactional and roll back at the end of each test. By default, Data JDBC tests are transactional and roll back at the end of each test.
See the {spring-reference}testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details. See the {spring-framework-docs}testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
If that is not what you want, you can disable transaction management for a test or for the whole test class as <<boot-features-testing-spring-boot-applications-testing-autoconfigured-jdbc-test,shown in the JDBC example>>. If that is not what you want, you can disable transaction management for a test or for the whole test class as <<boot-features-testing-spring-boot-applications-testing-autoconfigured-jdbc-test,shown in the JDBC example>>.
If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `DataJpaTest`. If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `DataJpaTest`.
@ -6242,7 +6243,7 @@ The following example shows a typical setup for using Neo4J tests in Spring Boot
---- ----
By default, Data Neo4j tests are transactional and roll back at the end of each test. By default, Data Neo4j tests are transactional and roll back at the end of each test.
See the {spring-reference}testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details. See the {spring-framework-docs}testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
If that is not what you want, you can disable transaction management for a test or for the whole class, as follows: If that is not what you want, you can disable transaction management for a test or for the whole class, as follows:
[source,java,indent=0] [source,java,indent=0]
@ -6382,7 +6383,7 @@ The specific beans that you want to test should be specified by using the `value
[[boot-features-testing-spring-boot-applications-testing-autoconfigured-rest-docs]] [[boot-features-testing-spring-boot-applications-testing-autoconfigured-rest-docs]]
==== Auto-configured Spring REST Docs Tests ==== Auto-configured Spring REST Docs Tests
You can use the `@AutoConfigureRestDocs` annotation to use {spring-rest-docs}[Spring REST Docs] in your tests with Mock MVC, REST Assured, or WebTestClient. You can use the `@AutoConfigureRestDocs` annotation to use {spring-restdocs}[Spring REST Docs] in your tests with Mock MVC, REST Assured, or WebTestClient.
It removes the need for the JUnit rule in Spring REST Docs. It removes the need for the JUnit rule in Spring REST Docs.
`@AutoConfigureRestDocs` can be used to override the default output directory (`target/generated-snippets` if you are using Maven or `build/generated-snippets` if you are using Gradle). `@AutoConfigureRestDocs` can be used to override the default output directory (`target/generated-snippets` if you are using Maven or `build/generated-snippets` if you are using Gradle).
@ -6701,9 +6702,9 @@ include::{test-examples}/web/client/SampleWebClientTests.java[tag=test]
Spring Boot provides WebSockets auto-configuration for embedded Tomcat, Jetty, and Undertow. Spring Boot provides WebSockets auto-configuration for embedded Tomcat, Jetty, and Undertow.
If you deploy a war file to a standalone container, Spring Boot assumes that the container is responsible for the configuration of its WebSocket support. If you deploy a war file to a standalone container, Spring Boot assumes that the container is responsible for the configuration of its WebSocket support.
Spring Framework provides {spring-reference}web.html#websocket[rich WebSocket support] for MVC web applications that can be easily accessed through the `spring-boot-starter-websocket` module. Spring Framework provides {spring-framework-docs}web.html#websocket[rich WebSocket support] for MVC web applications that can be easily accessed through the `spring-boot-starter-websocket` module.
WebSocket support is also available for {spring-reference}web-reactive.html#webflux-websocket[reactive web applications] and requires to include the WebSocket API alongside `spring-boot-starter-webflux`: WebSocket support is also available for {spring-framework-docs}web-reactive.html#webflux-websocket[reactive web applications] and requires to include the WebSocket API alongside `spring-boot-starter-webflux`:
[source,xml,indent=0,subs="verbatim,quotes,attributes"] [source,xml,indent=0,subs="verbatim,quotes,attributes"]
---- ----
@ -6719,7 +6720,7 @@ WebSocket support is also available for {spring-reference}web-reactive.html#webf
== Web Services == Web Services
Spring Boot provides Web Services auto-configuration so that all you must do is define your `Endpoints`. Spring Boot provides Web Services auto-configuration so that all you must do is define your `Endpoints`.
The {spring-webservices-reference}[Spring Web Services features] can be easily accessed with the `spring-boot-starter-webservices` module. The {spring-webservices-docs}[Spring Web Services features] can be easily accessed with the `spring-boot-starter-webservices` module.
`SimpleWsdl11Definition` and `SimpleXsdSchema` beans can be automatically created for your WSDLs and XSDs respectively. `SimpleWsdl11Definition` and `SimpleXsdSchema` beans can be automatically created for your WSDLs and XSDs respectively.
To do so, configure their location, as shown in the following example: To do so, configure their location, as shown in the following example:
@ -6734,7 +6735,7 @@ To do so, configure their location, as shown in the following example:
[[boot-features-webservices-template]] [[boot-features-webservices-template]]
=== Calling Web Services with `WebServiceTemplate` === Calling Web Services with `WebServiceTemplate`
If you need to call remote Web services from your application, you can use the {spring-webservices-reference}#client-web-service-template[`WebServiceTemplate`] class. If you need to call remote Web services from your application, you can use the {spring-webservices-docs}#client-web-service-template[`WebServiceTemplate`] class.
Since `WebServiceTemplate` instances often need to be customized before being used, Spring Boot does not provide any single auto-configured `WebServiceTemplate` bean. Since `WebServiceTemplate` instances often need to be customized before being used, Spring Boot does not provide any single auto-configured `WebServiceTemplate` bean.
It does, however, auto-configure a `WebServiceTemplateBuilder`, which can be used to create `WebServiceTemplate` instances when needed. It does, however, auto-configure a `WebServiceTemplateBuilder`, which can be used to create `WebServiceTemplate` instances when needed.
@ -6792,7 +6793,7 @@ Additional `@Conditional` annotations are used to constrain when the auto-config
Usually, auto-configuration classes use `@ConditionalOnClass` and `@ConditionalOnMissingBean` annotations. Usually, auto-configuration classes use `@ConditionalOnClass` and `@ConditionalOnMissingBean` annotations.
This ensures that auto-configuration applies only when relevant classes are found and when you have not declared your own `@Configuration`. This ensures that auto-configuration applies only when relevant classes are found and when you have not declared your own `@Configuration`.
You can browse the source code of {sc-spring-boot-autoconfigure}[`spring-boot-autoconfigure`] to see the `@Configuration` classes that Spring provides (see the {github-code}/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories[`META-INF/spring.factories`] file). You can browse the source code of {spring-boot-autoconfigure-module-code}[`spring-boot-autoconfigure`] to see the `@Configuration` classes that Spring provides (see the {spring-boot-code}/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories[`META-INF/spring.factories`] file).
@ -6813,7 +6814,7 @@ Make sure that they are defined in a specific package space and that they are ne
Furthermore, auto-configuration classes should not enable component scanning to find additional components. Furthermore, auto-configuration classes should not enable component scanning to find additional components.
Specific ``@Import``s should be used instead. Specific ``@Import``s should be used instead.
You can use the {sc-spring-boot-autoconfigure}/AutoConfigureAfter.{sc-ext}[`@AutoConfigureAfter`] or {sc-spring-boot-autoconfigure}/AutoConfigureBefore.{sc-ext}[`@AutoConfigureBefore`] annotations if your configuration needs to be applied in a specific order. You can use the {spring-boot-autoconfigure-module-code}/AutoConfigureAfter.java[`@AutoConfigureAfter`] or {spring-boot-autoconfigure-module-code}/AutoConfigureBefore.java[`@AutoConfigureBefore`] annotations if your configuration needs to be applied in a specific order.
For example, if you provide web-specific configuration, your class may need to be applied after `WebMvcAutoConfiguration`. For example, if you provide web-specific configuration, your class may need to be applied after `WebMvcAutoConfiguration`.
If you want to order certain auto-configurations that should not have any direct knowledge of each other, you can also use `@AutoConfigureOrder`. If you want to order certain auto-configurations that should not have any direct knowledge of each other, you can also use `@AutoConfigureOrder`.
@ -6929,7 +6930,7 @@ A reactive web application is any application that uses a `ReactiveWebApplicatio
[[boot-features-spel-conditions]] [[boot-features-spel-conditions]]
==== SpEL Expression Conditions ==== SpEL Expression Conditions
The `@ConditionalOnExpression` annotation lets configuration be included based on the result of a {spring-reference}core.html#expressions[SpEL expression]. The `@ConditionalOnExpression` annotation lets configuration be included based on the result of a {spring-framework-docs}core.html#expressions[SpEL expression].
@ -7127,10 +7128,10 @@ If a project is created with only your custom starter, Spring Boot's core featur
[[boot-features-kotlin]] [[boot-features-kotlin]]
== Kotlin support == Kotlin support
https://kotlinlang.org[Kotlin] is a statically-typed language targeting the JVM (and other platforms) which allows writing concise and elegant code while providing {kotlin-documentation}java-interop.html[interoperability] with existing libraries written in Java. https://kotlinlang.org[Kotlin] is a statically-typed language targeting the JVM (and other platforms) which allows writing concise and elegant code while providing {kotlin-docs}java-interop.html[interoperability] with existing libraries written in Java.
Spring Boot provides Kotlin support by leveraging the support in other Spring projects such as Spring Framework, Spring Data, and Reactor. Spring Boot provides Kotlin support by leveraging the support in other Spring projects such as Spring Framework, Spring Data, and Reactor.
See the {spring-reference}languages.html#kotlin[Spring Framework Kotlin support documentation] for more information. See the {spring-framework-docs}languages.html#kotlin[Spring Framework Kotlin support documentation] for more information.
The easiest way to start with Spring Boot and Kotlin is to follow https://spring.io/guides/tutorials/spring-boot-kotlin/[this comprehensive tutorial]. The easiest way to start with Spring Boot and Kotlin is to follow https://spring.io/guides/tutorials/spring-boot-kotlin/[this comprehensive tutorial].
You can create new Kotlin projects via https://start.spring.io/#!language=kotlin[start.spring.io]. You can create new Kotlin projects via https://start.spring.io/#!language=kotlin[start.spring.io].
@ -7143,7 +7144,7 @@ Feel free to join the #spring channel of https://slack.kotlinlang.org/[Kotlin Sl
Spring Boot supports Kotlin 1.2.x. To use Kotlin, `org.jetbrains.kotlin:kotlin-stdlib` and `org.jetbrains.kotlin:kotlin-reflect` must be present on the classpath. Spring Boot supports Kotlin 1.2.x. To use Kotlin, `org.jetbrains.kotlin:kotlin-stdlib` and `org.jetbrains.kotlin:kotlin-reflect` must be present on the classpath.
The `kotlin-stdlib` variants `kotlin-stdlib-jdk7` and `kotlin-stdlib-jdk8` can also be used. The `kotlin-stdlib` variants `kotlin-stdlib-jdk7` and `kotlin-stdlib-jdk8` can also be used.
Since https://discuss.kotlinlang.org/t/classes-final-by-default/166[Kotlin classes are final by default], you are likely to want to configure {kotlin-documentation}compiler-plugins.html#spring-support[kotlin-spring] plugin in order to automatically open Spring-annotated classes so that they can be proxied. Since https://discuss.kotlinlang.org/t/classes-final-by-default/166[Kotlin classes are final by default], you are likely to want to configure {kotlin-docs}compiler-plugins.html#spring-support[kotlin-spring] plugin in order to automatically open Spring-annotated classes so that they can be proxied.
https://github.com/FasterXML/jackson-module-kotlin[Jackson's Kotlin module] is required for serializing / deserializing JSON data in Kotlin. https://github.com/FasterXML/jackson-module-kotlin[Jackson's Kotlin module] is required for serializing / deserializing JSON data in Kotlin.
It is automatically registered when found on the classpath. It is automatically registered when found on the classpath.
@ -7155,14 +7156,14 @@ TIP: These dependencies and plugins are provided by default if one bootstraps a
[[boot-features-kotlin-null-safety]] [[boot-features-kotlin-null-safety]]
=== Null-safety === Null-safety
One of Kotlin's key features is {kotlin-documentation}null-safety.html[null-safety]. One of Kotlin's key features is {kotlin-docs}null-safety.html[null-safety].
It deals with `null` values at compile time rather than deferring the problem to runtime and encountering a `NullPointerException`. It deals with `null` values at compile time rather than deferring the problem to runtime and encountering a `NullPointerException`.
This helps to eliminate a common source of bugs without paying the cost of wrappers like `Optional`. This helps to eliminate a common source of bugs without paying the cost of wrappers like `Optional`.
Kotlin also allows using functional constructs with nullable values as described in this https://www.baeldung.com/kotlin-null-safety[comprehensive guide to null-safety in Kotlin]. Kotlin also allows using functional constructs with nullable values as described in this https://www.baeldung.com/kotlin-null-safety[comprehensive guide to null-safety in Kotlin].
Although Java does not allow one to express null-safety in its type system, Spring Framework, Spring Data, and Reactor now provide null-safety of their API via tooling-friendly annotations. Although Java does not allow one to express null-safety in its type system, Spring Framework, Spring Data, and Reactor now provide null-safety of their API via tooling-friendly annotations.
By default, types from Java APIs used in Kotlin are recognized as {kotlin-documentation}java-interop.html#null-safety-and-platform-types[platform types] for which null-checks are relaxed. By default, types from Java APIs used in Kotlin are recognized as {kotlin-docs}java-interop.html#null-safety-and-platform-types[platform types] for which null-checks are relaxed.
{kotlin-documentation}java-interop.html#jsr-305-support[Kotlin's support for JSR 305 annotations] combined with nullability annotations provide null-safety for the related Spring API in Kotlin. {kotlin-docs}java-interop.html#jsr-305-support[Kotlin's support for JSR 305 annotations] combined with nullability annotations provide null-safety for the related Spring API in Kotlin.
The JSR 305 checks can be configured by adding the `-Xjsr305` compiler flag with the following options: `-Xjsr305={strict|warn|ignore}`. The JSR 305 checks can be configured by adding the `-Xjsr305` compiler flag with the following options: `-Xjsr305={strict|warn|ignore}`.
The default behavior is the same as `-Xjsr305=warn`. The default behavior is the same as `-Xjsr305=warn`.
@ -7210,7 +7211,7 @@ It also allows customization of the application as shown in the following exampl
[[boot-features-kotlin-api-extensions]] [[boot-features-kotlin-api-extensions]]
==== Extensions ==== Extensions
Kotlin {kotlin-documentation}extensions.html[extensions] provide the ability to extend existing classes with additional functionality. Kotlin {kotlin-docs}extensions.html[extensions] provide the ability to extend existing classes with additional functionality.
The Spring Boot Kotlin API makes use of these extensions to add new Kotlin specific conveniences to existing APIs. The Spring Boot Kotlin API makes use of these extensions to add new Kotlin specific conveniences to existing APIs.
`TestRestTemplate` extensions, similar to those provided by Spring Framework for `RestOperations` in Spring Framework, are provided. `TestRestTemplate` extensions, similar to those provided by Spring Framework for `RestOperations` in Spring Framework, are provided.
@ -7261,7 +7262,7 @@ class KotlinExampleProperties {
} }
---- ----
TIP: To generate <<appendix-configuration-metadata#configuration-metadata-annotation-processor,your own metadata>> using the annotation processor, {kotlin-documentation}kapt.html[`kapt` should be configured] with the `spring-boot-configuration-processor` dependency. TIP: To generate <<appendix-configuration-metadata#configuration-metadata-annotation-processor,your own metadata>> using the annotation processor, {kotlin-docs}kapt.html[`kapt` should be configured] with the `spring-boot-configuration-processor` dependency.
@ -7272,8 +7273,8 @@ JUnit 5 enables a test class to be instantiated once and reused for all of the c
This makes it possible to use `@BeforeAll` and `@AfterAll` annotations on non-static methods, which is a good fit for Kotlin. This makes it possible to use `@BeforeAll` and `@AfterAll` annotations on non-static methods, which is a good fit for Kotlin.
To use JUnit 5, exclude `junit:junit` dependency from `spring-boot-starter-test`, add JUnit 5 dependencies, and configure the Maven or Gradle plugin accordingly. To use JUnit 5, exclude `junit:junit` dependency from `spring-boot-starter-test`, add JUnit 5 dependencies, and configure the Maven or Gradle plugin accordingly.
See the {junit5-documentation}/#dependency-metadata-junit-jupiter-samples[JUnit 5 documentation] for more details. See the {junit5-docs}/#dependency-metadata-junit-jupiter-samples[JUnit 5 documentation] for more details.
You also need to {junit5-documentation}/#writing-tests-test-instance-lifecycle-changing-default[switch test instance lifecycle to "per-class"]. You also need to {junit5-docs}/#writing-tests-test-instance-lifecycle-changing-default[switch test instance lifecycle to "per-class"].
To mock Kotlin classes, https://mockk.io/[MockK] is recommended. To mock Kotlin classes, https://mockk.io/[MockK] is recommended.
If you need the `Mockk` equivalent of the Mockito specific <<boot-features-testing-spring-boot-applications-mocking-beans,`@MockBean` and `@SpyBean` annotations>>, you can use https://github.com/Ninja-Squad/springmockk[SpringMockK] which provides similar `@MockkBean` and `@SpykBean` annotations. If you need the `Mockk` equivalent of the Mockito specific <<boot-features-testing-spring-boot-applications-mocking-beans,`@MockBean` and `@SpyBean` annotations>>, you can use https://github.com/Ninja-Squad/springmockk[SpringMockK] which provides similar `@MockkBean` and `@SpykBean` annotations.
@ -7287,7 +7288,7 @@ If you need the `Mockk` equivalent of the Mockito specific <<boot-features-testi
[[boot-features-kotlin-resources-further-reading]] [[boot-features-kotlin-resources-further-reading]]
==== Further reading ==== Further reading
* {kotlin-documentation}[Kotlin language reference] * {kotlin-docs}[Kotlin language reference]
* https://slack.kotlinlang.org/[Kotlin Slack] (with a dedicated #spring channel) * https://slack.kotlinlang.org/[Kotlin Slack] (with a dedicated #spring channel)
* https://stackoverflow.com/questions/tagged/spring+kotlin[Stackoverflow with `spring` and `kotlin` tags] * https://stackoverflow.com/questions/tagged/spring+kotlin[Stackoverflow with `spring` and `kotlin` tags]
* https://try.kotlinlang.org/[Try Kotlin in your browser] * https://try.kotlinlang.org/[Try Kotlin in your browser]
@ -7313,7 +7314,7 @@ If you need the `Mockk` equivalent of the Mockito specific <<boot-features-testi
[[boot-features-whats-next]] [[boot-features-whats-next]]
== What to Read Next == What to Read Next
If you want to learn more about any of the classes discussed in this section, you can check out the {dc-root}[Spring Boot API documentation] or you can browse the {github-code}[source code directly]. If you want to learn more about any of the classes discussed in this section, you can check out the {spring-boot-api}[Spring Boot API documentation] or you can browse the {spring-boot-code}[source code directly].
If you have specific questions, take a look at the <<howto.adoc#howto, how-to>> section. If you have specific questions, take a look at the <<howto.adoc#howto, how-to>> section.
If you are comfortable with Spring Boot's core features, you can continue on and read about <<production-ready-features.adoc#production-ready, production-ready features>>. If you are comfortable with Spring Boot's core features, you can continue on and read about <<production-ready-features.adoc#production-ready, production-ready features>>.

@ -45,7 +45,7 @@ The parent project provides the following features:
* UTF-8 source encoding. * UTF-8 source encoding.
* A <<using-boot-dependency-management,Dependency Management section>>, inherited from the spring-boot-dependencies pom, that manages the versions of common dependencies. * A <<using-boot-dependency-management,Dependency Management section>>, inherited from the spring-boot-dependencies pom, that manages the versions of common dependencies.
This dependency management lets you omit <version> tags for those dependencies when used in your own pom. This dependency management lets you omit <version> tags for those dependencies when used in your own pom.
* An execution of the {spring-boot-maven-plugin-site}/repackage-mojo.html[`repackage` goal] with a `repackage` execution id. * An execution of the {spring-boot-maven-plugin-docs}/repackage-mojo.html[`repackage` goal] with a `repackage` execution id.
* Sensible https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html[resource filtering]. * Sensible https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html[resource filtering].
* Sensible plugin configuration (https://www.mojohaus.org/exec-maven-plugin/[exec plugin], https://github.com/ktoso/maven-git-commit-id-plugin[Git commit ID], and https://maven.apache.org/plugins/maven-shade-plugin/[shade]). * Sensible plugin configuration (https://www.mojohaus.org/exec-maven-plugin/[exec plugin], https://github.com/ktoso/maven-git-commit-id-plugin[Git commit ID], and https://maven.apache.org/plugins/maven-shade-plugin/[shade]).
* Sensible resource filtering for `application.properties` and `application.yml` including profile-specific files (for example, `application-dev.properties` and `application-dev.yml`) * Sensible resource filtering for `application.properties` and `application.yml` including profile-specific files (for example, `application-dev.properties` and `application-dev.yml`)
@ -82,7 +82,7 @@ For instance, to upgrade to another Spring Data release train, you would add the
</properties> </properties>
---- ----
TIP: Check the {github-code}/spring-boot-project/spring-boot-dependencies/pom.xml[`spring-boot-dependencies` pom] for a list of supported properties. TIP: Check the {spring-boot-code}/spring-boot-project/spring-boot-dependencies/pom.xml[`spring-boot-dependencies` pom] for a list of supported properties.
@ -166,8 +166,8 @@ There is no need to configure it unless you want to change the settings defined
=== Gradle === Gradle
To learn about using Spring Boot with Gradle, please refer to the documentation for Spring Boot's Gradle plugin: To learn about using Spring Boot with Gradle, please refer to the documentation for Spring Boot's Gradle plugin:
* Reference ({spring-boot-gradle-plugin}/reference/html[HTML] and {spring-boot-gradle-plugin}/reference/pdf/spring-boot-gradle-plugin-reference.pdf[PDF]) * Reference ({spring-boot-gradle-plugin-docs}[HTML] and {spring-boot-gradle-plugin-pdfdocs}[PDF])
* {spring-boot-gradle-plugin}/api[API] * {spring-boot-gradle-plugin-api}[API]
@ -271,7 +271,7 @@ Finally, Spring Boot also includes the following starters that can be used if yo
.Spring Boot technical starters .Spring Boot technical starters
include::../../../target/generated-resources/technical-starters.adoc[] include::../../../target/generated-resources/technical-starters.adoc[]
TIP: For a list of additional community contributed starters, see the {github-master-code}/spring-boot-project/spring-boot-starters/README.adoc[README file] in the `spring-boot-starters` module on GitHub. TIP: For a list of additional community contributed starters, see the {spring-boot-master-code}/spring-boot-project/spring-boot-starters/README.adoc[README file] in the `spring-boot-starters` module on GitHub.
@ -551,7 +551,7 @@ Most IDEs can import Maven projects directly.
For example, Eclipse users can select `Import...` -> `Existing Maven Projects` from the `File` menu. For example, Eclipse users can select `Import...` -> `Existing Maven Projects` from the `File` menu.
If you cannot directly import your project into your IDE, you may be able to generate IDE metadata by using a build plugin. Maven includes plugins for https://maven.apache.org/plugins/maven-eclipse-plugin/[Eclipse] and https://maven.apache.org/plugins/maven-idea-plugin/[IDEA]. If you cannot directly import your project into your IDE, you may be able to generate IDE metadata by using a build plugin. Maven includes plugins for https://maven.apache.org/plugins/maven-eclipse-plugin/[Eclipse] and https://maven.apache.org/plugins/maven-idea-plugin/[IDEA].
Gradle offers plugins for {gradle-user-guide}/userguide.html[various IDEs]. Gradle offers plugins for {gradle-docs}/userguide.html[various IDEs].
TIP: If you accidentally run a web application twice, you see a "`Port already in use`" error. STS users can use the `Relaunch` button rather than the `Run` button to ensure that any existing instance is closed. TIP: If you accidentally run a web application twice, you see a "`Port already in use`" error. STS users can use the `Relaunch` button rather than the `Run` button to ensure that any existing instance is closed.
@ -689,7 +689,7 @@ If you wish to log all request details (including potentially sensitive informat
NOTE: If you don't want property defaults to be applied you can set `spring.devtools.add-properties` to `false` in your `application.properties`. NOTE: If you don't want property defaults to be applied you can set `spring.devtools.add-properties` to `false` in your `application.properties`.
TIP: For a complete list of the properties that are applied by the devtools, see {sc-spring-boot-devtools}/env/DevToolsPropertyDefaultsPostProcessor.{sc-ext}[DevToolsPropertyDefaultsPostProcessor]. TIP: For a complete list of the properties that are applied by the devtools, see {spring-boot-devtools-module-code}/env/DevToolsPropertyDefaultsPostProcessor.java[DevToolsPropertyDefaultsPostProcessor].
@ -965,7 +965,7 @@ If you change a file before starting the remote client, it is not pushed to the
[[configuring-file-system-watcher]] [[configuring-file-system-watcher]]
==== Configuring File System Watcher ==== Configuring File System Watcher
{sc-spring-boot-devtools}/filewatch/FileSystemWatcher.{sc-ext}[FileSystemWatcher] works by polling the class changes with a certain time interval, and then waiting for a predefined quiet period to make sure there are no more changes. {spring-boot-devtools-module-code}/filewatch/FileSystemWatcher.java[FileSystemWatcher] works by polling the class changes with a certain time interval, and then waiting for a predefined quiet period to make sure there are no more changes.
The changes are then uploaded to the remote application. The changes are then uploaded to the remote application.
On a slower development environment, it may happen that the quiet period is not enough, and the changes in the classes may be split into batches. On a slower development environment, it may happen that the quiet period is not enough, and the changes in the classes may be split into batches.
The server is restarted after the first batch of class changes is uploaded. The server is restarted after the first batch of class changes is uploaded.

Loading…
Cancel
Save