|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.spring.boot.internal.VaadinServletConfiguration
@Configuration @EnableConfigurationProperties(value=VaadinServletConfigurationProperties.class) public class VaadinServletConfiguration
Spring configuration that sets up a
SpringVaadinServlet. If you want to
customize the servlet, extend it and make it available as a Spring bean.
By default, unless a custom mapping of the Vaadin servlet is performed using
the URL mapping configuration property
VaadinServletConfigurationProperties.getUrlMapping(), the Vaadin
servlet is mapped to a hidden path not to block requests destined to
DispatcherServlet. ServletForwardingController is then mapped
so that requests to all SpringUI paths are forwarded to the servlet
for the generation of a bootstrap page, which internally uses the Vaadin
servlet path for all other communication.
This approach currently relies on a hack that modifies request servlet path
and path info on the fly as those produced by
ServletForwardingController are not what VaadinServlet
expects. See SpringVaadinServlet for more information on this.
| Field Summary | |
|---|---|
protected org.springframework.context.ApplicationContext |
applicationContext
|
protected VaadinServletConfigurationProperties |
configurationProperties
|
static String |
DEFAULT_SERVLET_URL_MAPPING
|
static String |
STATIC_RESOURCES_URL_MAPPING
Mapping for static resources that is used in case a non-default mapping is used as the primary mapping. |
| Constructor Summary | |
|---|---|
VaadinServletConfiguration()
|
|
| Method Summary | |
|---|---|
protected void |
addInitParameters(org.springframework.boot.context.embedded.ServletRegistrationBean servletRegistrationBean)
|
void |
afterPropertiesSet()
|
protected org.springframework.boot.context.embedded.ServletRegistrationBean |
createServletRegistrationBean()
|
protected org.slf4j.Logger |
getLogger()
|
protected List<String> |
getUIPaths()
|
protected String[] |
getUrlMappings()
|
protected boolean |
isMappedToRoot()
Returns true if the Vaadin servlet is mapped to the context root, false otherwise. |
com.vaadin.server.VaadinServlet |
vaadinServlet()
|
protected org.springframework.boot.context.embedded.ServletRegistrationBean |
vaadinServletRegistration()
|
org.springframework.web.servlet.mvc.Controller |
vaadinUiForwardingController()
Forwarding controller that sends requests for the root page of Vaadin servlets to the Vaadin servlet. |
org.springframework.web.servlet.handler.SimpleUrlHandlerMapping |
vaadinUiForwardingHandlerMapping()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_SERVLET_URL_MAPPING
public static final String STATIC_RESOURCES_URL_MAPPING
@Autowired protected org.springframework.context.ApplicationContext applicationContext
@Autowired protected VaadinServletConfigurationProperties configurationProperties
| Constructor Detail |
|---|
public VaadinServletConfiguration()
| Method Detail |
|---|
@Bean public org.springframework.web.servlet.handler.SimpleUrlHandlerMapping vaadinUiForwardingHandlerMapping()
protected List<String> getUIPaths()
protected org.slf4j.Logger getLogger()
@Bean public org.springframework.web.servlet.mvc.Controller vaadinUiForwardingController()
protected boolean isMappedToRoot()
protected String[] getUrlMappings()
@Bean protected org.springframework.boot.context.embedded.ServletRegistrationBean vaadinServletRegistration()
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException@Bean @ConditionalOnMissingBean public com.vaadin.server.VaadinServlet vaadinServlet()
protected org.springframework.boot.context.embedded.ServletRegistrationBean createServletRegistrationBean()
protected void addInitParameters(org.springframework.boot.context.embedded.ServletRegistrationBean servletRegistrationBean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||