This commit adds support for Spring Boot error conventions with WebFlux.
The Spring MVC support for that is based on an `Controller` that's
mapped on a specific `"/error"` path and configured as an error page in
the Servlet container. With WebFlux, this support leverages a
`WebExceptionHandler`, which catches exceptions flowing through the
reactive pipeline and handles them.
The `DefaultErrorWebExceptionHandler` supports the following:
* return a JSON error response to machine clients
* return error HTML views (templates, static or default HTML view)
One can customize the error information by contributing an
`ErrorAttributes` bean to the application context.
Spring Boot provides an `ErrorWebExceptionHandler` marker interface and a
base implementation that provides high level constructs to handle
errors, based on the Spring WebFlux functional flavor.
The error handling logic can be completely changed by providing a custom
`RouterFunction` there.
Fixes gh-8625
Previously, the custom layout sample did not configure the source
and target for the compiler. This meant that both defaulted to 1.5
which is not supported by Java 9's javac. The oldest support version
is 1.6.
This commit sets the maven.compiler.source and maven.compiler.target
properties to 1.8 (the lowest version support by Boot 2.0) allowing
the sample to build with both Java 8 and Java 9.
See gh-10515
* gh-10588:
Polish "Provide informative reason when rejecting request with invalid level"
Provide informative reason when rejecting request with invalid level
Previously, bad request with no reason was included in the response.
This commit introduces the reason when invalid log level is sent in the
request.
Fixes gh-10588
Previously, rolled over files were always written to logs/. This
commit ensures that rotated logs are written into the directory
specified in the application config's logging.path property.
Closes gh-10554
Previously, if Undertow failed to start, some of Undertow's
internal components would have been started but the started field of
UndertowEmbeddedServletContainer remained false. This meant that when
stop() was called nothing was done as the container believed it had
not been started.
This commit updates UndertowEmbeddedServletContainer to stop both the
DeploymentManager and the Undertow instance in start() if an exception
is thrown. This aligns the behaviour of
UndertowEmbeddedServletContainer with that of the Tomcat equivalent.
Closes gh-10528