Package com.vaadin.flow.spring
Class VaadinServletContextInitializer
java.lang.Object
com.vaadin.flow.spring.VaadinServletContextInitializer
- All Implemented Interfaces:
org.springframework.boot.web.servlet.ServletContextInitializer
public class VaadinServletContextInitializer
extends Object
implements org.springframework.boot.web.servlet.ServletContextInitializer
Servlet context initializer for Spring Boot Application.
If Java application is used to run Spring Boot then it doesn't run registered
ServletContainerInitializer
s (e.g. to scan for Route
annotations in the classpath). This class enables this scanning via Spring so
that the functionality which relies on ServletContainerInitializer
works in the same way as in deployable WAR file.
- See Also:
-
ServletContainerInitializer
RouteRegistry
-
Constructor Summary
ConstructorsConstructorDescriptionVaadinServletContextInitializer
(org.springframework.context.ApplicationContext context) Creates a newServletContextInitializer
instance with applicationcontext
provided. -
Method Summary
-
Constructor Details
-
VaadinServletContextInitializer
public VaadinServletContextInitializer(org.springframework.context.ApplicationContext context) Creates a newServletContextInitializer
instance with applicationcontext
provided.- Parameters:
context
- the application context
-
-
Method Details
-
findClassesForDevMode
-
onStartup
public void onStartup(jakarta.servlet.ServletContext servletContext) throws jakarta.servlet.ServletException - Specified by:
onStartup
in interfaceorg.springframework.boot.web.servlet.ServletContextInitializer
- Throws:
jakarta.servlet.ServletException
-