spring-boot/spring-boot-project
Andy Wilkinson dbb24286ff Separate stopping and destruction so web server can be restarted
Previously, when a Servlet-based WebServer was stopped it would also
stop the ServletContext. This led to problems as Tomcat and Undertow
would then not allow a restart. Jetty would allow a restart but
duplicate servlet registrations would then be attempted.

This commit modifies the WebServer lifecycle to separate stopping
and destruction for both servlet and reactive web servers. This
allows a WebServer's stop() implementation to leave some components
running so that they can be restarted. To completely shut down a
WebServer destroy() must now be called.

Both Tomcat and Jetty WebServers have been updated to stop their
network connections when stop() is called but leave other components
running. This works with both servlet and reactive web servers.

Note that an Undertow-based Servlet web server does not support
stop and restart. Once stopped, a Servlet Deployment cannot be
restarted and it does not appear to be possible to separate the
lifecycle of its network connections and a Servlet deployment.

Reactor Netty and Undertow-based reactive web servers can now also
be stopped and then restarted. Calling stop() stops the whole server
but this does not cause a problem as there's no (application-exposed)
ServletContext involved. There may be room to optimize this in the
future if the need arises.

Closes gh-34955
2023-06-26 20:58:59 +01:00
..
spring-boot Separate stopping and destruction so web server can be restarted 2023-06-26 20:58:59 +01:00
spring-boot-actuator Remove deprecated code that was to be removed in 3.2 2023-06-23 18:14:22 +01:00
spring-boot-actuator-autoconfigure Remove deprecated code that was to be removed in 3.2 2023-06-23 18:14:22 +01:00
spring-boot-autoconfigure Remove deprecated code that was to be removed in 3.2 2023-06-23 18:14:22 +01:00
spring-boot-dependencies Merge branch '3.1.x' 2023-06-21 23:44:18 -07:00
spring-boot-devtools Merge branch '3.0.x' into 3.1.x 2023-06-13 13:52:10 +01:00
spring-boot-docker-compose Fix Maven-built native images with Docker Compose dependency 2023-06-21 11:44:30 +01:00
spring-boot-docs Merge branch '3.1.x' 2023-06-23 15:26:53 -06:00
spring-boot-parent Provide dependency management for Testcontainers 2023-03-23 16:49:08 +00:00
spring-boot-starters Merge branch '3.0.x' into 3.1.x 2023-06-15 14:47:21 +01:00
spring-boot-test Remove deprecated code that was to be removed in 3.2 2023-06-23 18:14:22 +01:00
spring-boot-test-autoconfigure Merge branch '3.1.x' 2023-06-23 16:12:58 -06:00
spring-boot-testcontainers Polish 2023-06-16 12:39:03 -07:00
spring-boot-tools Merge branch '3.1.x' 2023-06-23 15:47:00 -06:00