From 6dc0f90e007a503828e35f2ef14cbca96c791dfe Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Mon, 20 Mar 2023 17:59:24 -0500 Subject: [PATCH] Polish "Disable embedded web auto-config when not using embedded web server" See gh-34332 --- .../condition/ConditionalOnNotWarDeployment.java | 2 +- .../asciidoc/features/developing-auto-configuration.adoc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnNotWarDeployment.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnNotWarDeployment.java index 507b1f9eb4..0d8387274e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnNotWarDeployment.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnNotWarDeployment.java @@ -25,7 +25,7 @@ import java.lang.annotation.Target; import org.springframework.context.annotation.Conditional; /** - * {@link Conditional @Conditional} that only matches when the application is a not + * {@link Conditional @Conditional} that only matches when the application is not a * traditional WAR deployment. For applications with embedded servers, this condition will * return true. * diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc index a359708bd6..2dad062fee 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc @@ -125,12 +125,12 @@ Resources can be specified by using the usual Spring conventions, as shown in th [[features.developing-auto-configuration.condition-annotations.web-application-conditions]] ==== Web Application Conditions -The `@ConditionalOnWebApplication` and `@ConditionalOnNotWebApplication` annotations let configuration be included depending on whether the application is a "`web application`". +The `@ConditionalOnWebApplication` and `@ConditionalOnNotWebApplication` annotations let configuration be included depending on whether the application is a web application. A servlet-based web application is any application that uses a Spring `WebApplicationContext`, defines a `session` scope, or has a `ConfigurableWebEnvironment`. A reactive web application is any application that uses a `ReactiveWebApplicationContext`, or has a `ConfigurableReactiveWebEnvironment`. -The `@ConditionalOnWarDeployment` and `@ConditionalOnNotWarDeployment` annotation lets configuration be included depending on whether the application is a traditional WAR application that is deployed to a container. -This condition will not match for applications that are run with an embedded server. +The `@ConditionalOnWarDeployment` and `@ConditionalOnNotWarDeployment` annotations let configuration be included depending on whether the application is a traditional WAR application that is deployed to a servlet container. +This condition will not match for applications that are run with an embedded web server.