Disable embedded web auto-config when not using embedded web server

See gh-34332
This commit is contained in:
Guirong Hu
2023-02-22 17:41:43 +08:00
committed by Scott Frederick
parent fe39ee671d
commit b2facecb12
5 changed files with 127 additions and 4 deletions

View File

@@ -129,7 +129,7 @@ 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.
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.