Provide a condition for detecting war deployments

Closes gh-19421
This commit is contained in:
Madhura Bhave
2020-04-09 08:50:45 -07:00
parent 9aae072872
commit 1342e4970a
19 changed files with 315 additions and 6 deletions

View File

@@ -7606,6 +7606,9 @@ The `@ConditionalOnWebApplication` and `@ConditionalOnNotWebApplication` annotat
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` 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.
[[boot-features-spel-conditions]]