SmartApplicationListener has been superseded by GenericEventListener as
of Spring Framework 4.2. It will be eventually deprecated and removed.
Migrate our event listeners to use the new contract.
Closes gh-2576
When configured with a context path of "", Undertow 1.1.3 changes the
context path to be "/". The change [1] was made to fix UNDERTOW-350
[2].
[1] 3db7707b8b
[2] https://issues.jboss.org/browse/UNDERTOW-350
See gh-2732
Previously, the ErrorPageFilter was not invoked for async dispatches.
This meant that an error that was set during an async dispatch would
go undetected and a 200 response with an empty body would be returned.
This commit updates ErrorPageFilter to configure its
OncePerRequestFilter so that async dispatches are filtered and the
correct error handling is performed.
Closes gh-2711
Update SpringApplicationContextLoader so that the MockServletContext
uses FileSystemResourceLoader. This allows `/src/main/webapp` folder
to be found.
See gh-2654
Previously, SpringBootWebSecurityConfiguration required a web
application and @EnableWebSecurity to be on the classpath.
@EnableWebSecurity is in spring-security-config so this could lead
to the configuration being active when spring-security-web isn't
on the classpath but the rest of Spring Security is.
This commit updates SpringBootWebSecurityConfiguration to also make it
conditional on a class in spring-security-web.
Fixes gh-2717
Spring Framework’s ParamterizedRowMapper has been deprecated since
3.1 and has been removed in 4.2. Spring Batch currently relies on
ParameterizedRowMapper, making it incompatible with 4.2. To allow us to
build successfully against 4.2, this commit ignores Spring Boot’s tests
that use Spring Batch’s JDBC support.
See gh-2575
In Spring Framework 4.1, @Order on a @Configuration class had no effect.
This allowed us to use it on auto-configuration classes to control
the ordering of auto-configuration classes without it having any
broader implications for configuration class ordering.
Spring Framework 4.2 now honours @Order on @Configuration classes. This
breaks a number of tests where we were relying on the order that the
classes were passed to register when evaluating various bean conditions.
This commit replaces the use of @Order on auto-configuration classes
with a new annotation, @AutoConfigureOrder. The new annotation is
handled by AutoConfigurationSorter where it’s used to order
auto-configuration classes. This allows us to order auto-configuration
classes without the unwanted side-effect of this also affecting the
general ordering of configuration classes.
See gh-2575
Add an additional constructor to ServletRegistrationBean that indicates
if a URL mapping is always required. If set to false, the registration
will not longer use the default '/*' mapping.
Fixes gh-2596
Update SpringApplicationContextLoader to use a MockServletContext
subclass which also respects common Spring Boot resource locations. This
allows resources in `/META-INF/resources`, `/resources`, `/public` and
`/static` to be loaded in the same way as those in `/src/main/webapp`.
SpringBootMockServletContext also returns an empty temporary folder for
'/' when no resource locations can be found. This is primarily to
prevent superfluous warnings from Liquibase.
Fixes gh-2654
Update SystemPublicMetrics to silently ignore ManagementFactory
NoClassDefFoundErrors which can occur when deploying to Google App
Engine.
Fixes gh-2701