Class SpringServlet

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class SpringServlet
    extends VaadinServlet
    Spring application context aware Vaadin servlet implementation.

    This class is not intended to be used directly. It's instantiated automatically by the Spring add-on:

    Author:
    Vaadin Ltd
    See Also:
    Serialized Form
    • Field Detail

      • PROPERTY_NAMES

        protected static final List<String> PROPERTY_NAMES
        Property names that are read from the application.properties file
    • Constructor Detail

      • SpringServlet

        public SpringServlet​(org.springframework.context.ApplicationContext context,
                             boolean rootMapping)
        Creates a new Vaadin servlet instance with the application context provided.

        Use true as a value for forwardingEnforced parameter if your servlet is mapped to the root ("/*"). In the case of root mapping a RootMappedCondition is checked and VaadinServletConfiguration is applied conditionally. This configuration provide a ServletForwardingController so that other Spring endpoints may co-exist with Vaadin application (it's required since root mapping handles any request to the context). This is not needed if you are using non-root mapping since are you free to use the mapping which doesn't overlap with any endpoint mapping. In this case use false for the forwardingEnforced parameter.

        Parameters:
        context - the Spring application context
        rootMapping - the incoming HttpServletRequest is wrapped in ForwardingRequestWrapper if true and push URL is prefixed with VaadinServletConfiguration.VAADIN_SERVLET_MAPPING