0

I have a working vaadin-8 application. I want to migrate this application to vaadin-23.I have added dependencies related to vaadin-23

            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-bom</artifactId>
                <version>${vaadin23.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

i am able to create views based on vaadin-23. But the problem is my vaadin-23 views with @Route annotation are not being used. I am not able to hit those urls from the browser. Do I need to create some servlet for vaadin-23 as I did for vaadin-8?

Ankesh
  • 41
  • 8
  • Check this example project for step by step migration from Vaadin 8 to Vaadin 14 running both apps at the same time. Scenario with Vaadin 23 should not be different regarding project setup. https://github.com/TatuLund/migrate-v8-to-v14/tree/master – Tatu Lund Apr 11 '22 at 08:12
  • I followed these migration steps but the problem is my `@Route` annotated URL is not getting registered.I have used `Vaadin4Spring` library in vaadin-8 to register a custom servlet. I think that my servelet for vaadin-23 is not getting registered. I dont see any vaadin flow related logs when app gets started. Tahnks For help – Ankesh Apr 12 '22 at 11:16
  • My application uses legacy vaadin-springboot version 3.2.1 and for vaadin-23 we require vaadin-spring version 23.0.4 . Can using these together cause problems? – Ankesh Apr 13 '22 at 01:48
  • Yes, that is most likely the case. Both versions of the Spring add-ons define new scopes and there will be a clash. – Tatu Lund Apr 13 '22 at 03:46
  • Thanks but do we have any workaround for this situation? – Ankesh Apr 13 '22 at 07:42
  • One can always deploy two different wars either on different context paths or different ports. Naturally you should keep the projects separated. But if your requirement is to keep two apps running on the same server, so that it is easy to switch between them, it will work for that purpose. – Tatu Lund Apr 13 '22 at 08:34

1 Answers1

1

If the application is not using Spring check this example project for step by step migration from Vaadin 8 to Vaadin 14 running both apps at the same time in the same workspace. Scenario with Vaadin 23 should not be different regarding project setup. github.com/TatuLund/migrate-v8-to-v14/tree/master

But if you use Spring Boot, that is most likely the case. Both Vaadin versions require different version of the Spring add-ons, and those in turn define new scopes and there will be a clash.

In such case one can always deploy two different wars either on different context paths or different ports. Naturally you should keep the projects separated and use different IDE instance for each one. But if your requirement is to keep two apps running on the same server, so that it is easy to switch between them, it will work for that purpose.

Tatu Lund
  • 9,949
  • 1
  • 12
  • 26