Restructure embedded web server packages

Rework `org.springframework.boot.context.embedded` to relocate classes
to `org.springframework.boot.web`. Packages are now organized around
the following areas:

Packages for shared concerns, for example the `WebServer` interface
to start/stop a server and the common configuration elements:
- org.springframework.boot.web.context
- org.springframework.boot.web.server

Servlet specific packages:
- org.springframework.boot.web.servlet.server
- org.springframework.boot.web.servlet.context
- org.springframework.boot.web.servlet.filter

Reactive specific packages:
- org.springframework.boot.web.reactive.context
- org.springframework.boot.web.reactive.server

Embedded server implementations (both reactive and servlet):
- org.springframework.boot.web.embedded

In addition:

- Rename `EmbeddedServletContainerFactory` to `ServletWebServerFactory`
  to align with the `ReactiveWebServerFactory`.
- Rename `EmbeddedWebApplicationContext` to
  `ServletWebServerApplicationContext` and
- Rename `EmbeddedReactiveWebApplicationContext` to
  `ReactiveWebServerApplicationContext`.
- Add checkstyle rules to restrict imports.
- Fixup all affected code to use the correct imports and local names.

Fixes gh-8532
This commit is contained in:
Phillip Webb
2017-03-07 11:26:11 -08:00
parent 7b388e5865
commit 67556ba8ea
263 changed files with 2821 additions and 3287 deletions

View File

@@ -25,7 +25,7 @@ import com.sun.jersey.spi.container.servlet.ServletContainer;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
@@ -41,8 +41,8 @@ public class SampleJersey1Application {
@Bean
// Not needed if Spring Web MVC is also present on classpath
public TomcatEmbeddedServletContainerFactory tomcatEmbeddedServletContainerFactory() {
return new TomcatEmbeddedServletContainerFactory();
public TomcatServletWebServerFactory webServerFactory() {
return new TomcatServletWebServerFactory();
}
@Bean