Class VaadinServletConfiguration


  • @Configuration
    @Conditional(RootMappedCondition.class)
    public class VaadinServletConfiguration
    extends Object
    Vaadin servlet configuration.

    The configuration is used only when the Vaadin servlet is mapped to the root ("/*") because in this case the servlet is mapped to "/vaadinServlet/*" instead of ("/*"). It's done to make possible to configure other Spring services (like endpoints) which have overlapping path.

    Author:
    Vaadin Ltd
    • Constructor Detail

      • VaadinServletConfiguration

        public VaadinServletConfiguration()
    • Method Detail

      • vaadinRootMapping

        @Bean
        public com.vaadin.flow.spring.VaadinServletConfiguration.RootExcludeHandler vaadinRootMapping​(org.springframework.core.env.Environment environment)
        Makes an url handler mapping allowing to forward requests from a DispatcherServlet to VaadinServlet.
        Returns:
        an url handler mapping instance which forwards requests to vaadin servlet
      • vaadinForwardingController

        @Bean
        public org.springframework.web.servlet.mvc.Controller vaadinForwardingController()
        Makes a forwarding controller.
        Returns:
        a forwarding controller