Skip to content

Commit

Permalink
Polish "Disable embedded web auto-config when not using embedded web …
Browse files Browse the repository at this point in the history
…server"

See gh-34332
  • Loading branch information
scottfrederick committed Mar 20, 2023
1 parent b2facec commit 6dc0f90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.



Expand Down

0 comments on commit 6dc0f90

Please sign in to comment.