Since SPR-15536, WebFlux.fn is now configured with `@EnableWebFlux`,
along the annotated controllers. Both `RouterFunction` and Controller
instances can now live within the same application and they share
the same web infrastructure.
This commit removes the custom auto-configuration for `RouterFunction`
and relies on `@EnableWebFlux` for that.
Closes gh-9165
Previously, if Jetty's thread pool was misconfigured, the Server would
still start successfully.
When it is started, the Server examines its Connectors to determine
how many threads are required. If its thread pool does not meet the
Connectors' requirements, an IllegalStateException is thrown and the
Server fails to start. However, JettyEmbeddedServletContainer
temporarily removes the Server's Connectors while it is being started
so that requests will not be accepted until the application is ready.
This has the unwanted side-effect of causing a misconfigured thread
pool to go undetected as the Connectors' thread requirements are not
taken into consideration.
The verification of the thread pool configuration and the starting of
the Connectors is done in the Server's doStart() method which has
three steps that are of interest:
1. Verify the Server's thread pool configuration
2. Start any managed beans that have been added to the Server
3. Start the Server's Connectors.
To allow the thread pool configuration to be verified while still
preventing the Connectors from being started, the Connectors need to
be removed in step 2. This is achieved by registering a managed bean
with the Server that nulls out the Server's Connectors as part of its
doStart() method.
Closes gh-8917
This change aligns ErrorAttributes with ResponseEntityExceptionHandler
which takes a WebRequest as a parameter of its handleException method.
WebRequest extends RequestAttributes and provides access to much more
than just the request's attributes. For example request headers and
parameters are available from WebRequest.
Closes gh-7952
Closes gh-6555