Package com.vaadin.flow.spring
Class VaadinMVCWebAppInitializer
- java.lang.Object
-
- com.vaadin.flow.spring.VaadinMVCWebAppInitializer
-
- All Implemented Interfaces:
org.springframework.web.WebApplicationInitializer
public abstract class VaadinMVCWebAppInitializer extends Object implements org.springframework.web.WebApplicationInitializer
Abstract Vaadin Spring MVCWebApplicationInitializer.Extend this class in your Spring MVC application and provide your configuration classes via the
getConfigurationClasses()method.- Author:
- Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor Description VaadinMVCWebAppInitializer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Collection<Class<?>>getConfigurationClasses()Gets the application configuration classes.voidonStartup(javax.servlet.ServletContext servletContext)protected voidregisterConfiguration(org.springframework.web.context.support.AnnotationConfigWebApplicationContext context)Registers application configuration classes.
-
-
-
Method Detail
-
onStartup
public void onStartup(javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException- Specified by:
onStartupin interfaceorg.springframework.web.WebApplicationInitializer- Throws:
javax.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()
-
getConfigurationClasses
protected abstract Collection<Class<?>> getConfigurationClasses()
Gets the application configuration classes.- Returns:
- a collection of configuration classes
-
-