servletWebServerFactory made lazy to run as web application
This commit is contained in:
@@ -28,6 +28,7 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Conditional;
|
import org.springframework.context.annotation.Conditional;
|
||||||
import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
|
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
|
||||||
import org.springframework.web.servlet.DispatcherServlet;
|
import org.springframework.web.servlet.DispatcherServlet;
|
||||||
|
|
||||||
@@ -72,6 +73,7 @@ public class Application extends SpringBootServletInitializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@Lazy
|
||||||
public ServletWebServerFactory servletWebServerFactory() {
|
public ServletWebServerFactory servletWebServerFactory() {
|
||||||
return new JettyServletWebServerFactory();
|
return new JettyServletWebServerFactory();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user