spring icon indicating copy to clipboard operation
spring copied to clipboard

Annotate auto configurations with spring's @ConditionalOnWebApplication

Open SonReimer opened this issue 3 years ago • 0 comments

Spring-Boot offers the possibility to start an application as web application with an embedded server or as a standalone application by setting the property spring.main.web-application-type=none There are several scenarios that require doing so. Examples are creating a db-creation/update script from hibernate or running a preload without starting the server or dropping the schema in development. Spring itself uses the annotation @ConditionalOnWebApplication in it's configuration class ServletWebServerAutoConfiguration and I think the vaadin configurations SpringBootAutoConfiguration and SpringSecurityAutoConfiguration should follow the same way.

SonReimer avatar Aug 08 '22 07:08 SonReimer