This commit adds a new configuration key:
spring.http.encoding.mapping.<locale>=<charset>
This allows to specify which default charset should be used for any
given Locale, if none has been provided already in the response itself.
This applies to all supported embedded servlet containers.
Fixes gh-6453
Prior to this commit parsing addresses had an inconsistent effect on the
various properties that can be contained in an address (host, port,
username, password, and virtual host).
Three different approaches were used:
1. Return the property if no addresses were set. If there was one
address set, return the property from the address. Otherwise return
null. (host)
2. Return the property if no address were set, otherwise return the
property from the first address (port)
3. Return the property if no addresses were set, otherwise return the
property from the last address that had such property (username,
password, virtual host).
This commit aims to make the behaviour consistent. If no addresses
were set the property is returned. Otherwise the value extracted from
the first address is returned. If the first address has no such value
the property is returned.
Closes gh-6424
Previously, one SpringApplicationAdminMXBeanRegistrar was created
per context. When there was more then one context this would result
in a javax.management.InstanceAlreadyExistsException being thrown
as an attempt was made to register the MBean more than once.
This commit updates SpringApplicationAdminJmxAutoConfiguration so
that the registrar is only created when there's no such existing bean
in the context hierarchy.
Closes gh-6378
Commit 3ea84f9e1 has wrongly introduced a `@Primary` marker on
`IntegrationMBeanExporter` so any use of both Spring's JMX support
and Spring Integration's JMX support leads to an exception. This commit
makes sure to remove the unnecessary `@Primary`
Closes gh-6328
This commit makes sure to use `getAliasedStringArray` rather than
`getStringArray` as the latter does not work with ASM. While this will
probably be fixed in the core framework, this commit also adds dedicated
tests with ASM to ensure that the code works as expected.
Closes gh-6337
By default Jersey configures Jackson to use both Jackson annotations
and JAXB annotations when introspective types for (de)serialization.
However, the changes made in 5776d6a8 mean that Jersey no longer uses
its default ObjectMapper configuration and uses the auto-configured
ObjectMapper instead. This had the unwanted side-effect of leaving
Jersey with an ObjectMapper that only uses Jackson annotations and
ignores JAXB annotations.
This commit updates JerseyAutoConfiguration so that it will add the
JaxbAnnotationIntrospector to the auto-configured ObjectMapper for
both serialization and deserialization. It uses
AnnotationIntrospectorPair to ensure retain any existing
introspectors.
Closes gh-6310
This commit adds a new property, server.tomcat.redirect-context-root,
that can be used to configure the Tomcat Context’s
mapperContextRootRedirectEnabled property. The default is to not apply
any configuration and, therefore, to use Tomcat’s default of true.
Closes gh-6248
Change WebMvcAutoConfigurationAdapter.requestContextFilter() to a static
method so that the configuration class isn't needed when creating it.
This helps to prevent early initialization of beans.
See gh-6178
Previously, Spring Mobile was only supported for Thymeleaf and JSPs. This
commit improves the auto-configuration to also provide device delegating
support for Freemarker, Groovy Templates and Mustache.
Closes gh-5140