Home / Class/ WarDeploymentApplicationContextFactory Class — spring-boot Architecture

WarDeploymentApplicationContextFactory Class — spring-boot Architecture

Architecture documentation for the WarDeploymentApplicationContextFactory class in SpringBootServletInitializer.java from the spring-boot codebase.

Entity Profile

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/SpringBootServletInitializer.java lines 291–329

	private static final class WarDeploymentApplicationContextFactory implements ApplicationContextFactory {

		private final ServletContext servletContext;

		private WarDeploymentApplicationContextFactory(ServletContext servletContext) {
			this.servletContext = servletContext;
		}

		@Override
		public @Nullable Class<? extends ConfigurableEnvironment> getEnvironmentType(
				@Nullable WebApplicationType webApplicationType) {
			return (webApplicationType != WebApplicationType.SERVLET) ? null : ApplicationServletEnvironment.class;
		}

		@Override
		public ConfigurableEnvironment createEnvironment(@Nullable WebApplicationType webApplicationType) {
			return new ApplicationServletEnvironment();
		}

		@Override
		public ConfigurableApplicationContext create(@Nullable WebApplicationType webApplicationType) {
			return new AnnotationConfigServletWebApplicationContext() {

				@Override
				protected void onRefresh() {
					super.onRefresh();
					try {
						new WebApplicationContextInitializer(this)
							.initialize(WarDeploymentApplicationContextFactory.this.servletContext);
					}
					catch (ServletException ex) {
						throw new ApplicationContextException("Cannot initialize servlet context", ex);
					}
				}

			};
		}

	}

Domain

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free