From eafa7cfb4cff9d385f0c3cbb97a909d34f1fd924 Mon Sep 17 00:00:00 2001 From: Matteo Steccolini Date: Mon, 18 Dec 2023 09:07:59 +0100 Subject: [PATCH] servletWebServerFactory made lazy to run as web application --- src/main/java/ca/uhn/fhir/jpa/starter/Application.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/Application.java b/src/main/java/ca/uhn/fhir/jpa/starter/Application.java index c626c96..36a432c 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/Application.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/Application.java @@ -28,6 +28,7 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Import; +import org.springframework.context.annotation.Lazy; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; @@ -72,6 +73,7 @@ public class Application extends SpringBootServletInitializer { } @Bean + @Lazy public ServletWebServerFactory servletWebServerFactory() { return new JettyServletWebServerFactory(); }