com.vaadin.flow.spring.
Class VaadinMVCWebAppInitializer
All Implemented Interfaces:
org.springframework.web.WebApplicationInitializer
Abstract Vaadin Spring MVC WebApplicationInitializer
.
Extend this class in your Spring MVC application and provide your
configuration classes via the getConfigurationClasses()
method.
Author:
Vaadin Ltd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Collection<Class<?>>
Gets the application configuration classes.
void
onStartup
(jakarta.servlet.ServletContext servletContext) protected void
registerConfiguration
(org.springframework.web.context.support.AnnotationConfigWebApplicationContext context) Registers application configuration classes.
-
Constructor Details
-
VaadinMVCWebAppInitializer
public VaadinMVCWebAppInitializer()
-
-
Method Details
-
onStartup
public void onStartup(jakarta.servlet.ServletContext servletContext) throws jakarta.servlet.ServletException Specified by:
onStartup
in interfaceorg.springframework.web.WebApplicationInitializer
Throws:
jakarta.servlet.ServletException
-
registerConfiguration
protected void registerConfiguration(org.springframework.web.context.support.AnnotationConfigWebApplicationContext context) Registers application configuration classes.
Uses developer defined configuration classes via the
getConfigurationClasses()
method. Also register Vaadin configuration from the add-on.Override this method if you want to register configuration classes in a totally different way or just provide implementation for
getConfigurationClasses()
method.Parameters:
context
- web application context, notnull
See Also:
-
getConfigurationClasses
Gets the application configuration classes.
Returns:
a collection of configuration classes
-