运行vaadin与vaadin-8一起流动

发布于 2025-01-20 08:18:03 字数 584 浏览 6 评论 0原文

我有一个可用的 vaadin-8 应用程序。我想将此应用程序迁移到 vaadin-23。我添加了与 vaadin-23 相关的依赖项,

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

我能够创建基于 vaadin-23 的视图。但问题是我带有 @Route 注释的 vaadin-23 视图没有被使用。我无法从浏览器访问这些网址。我是否需要像为 vaadin-8 那样为 vaadin-23 创建一些 servlet?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

命硬 2025-01-27 08:18:03

如果应用程序未使用 Spring,请检查此示例项目,以逐步从 Vaadin 8 迁移到 Vaadin 14,并在同一工作区中同时运行这两个应用程序。 Vaadin 23 的场景在项目设置方面不应有所不同。 github.com/TatuLund/migrate-v8-to-v14/tree/master

但如果您使用 Spring Boot,则很可能是这种情况。两个 Vaadin 版本都需要不同版本的 Spring 附加组件,而这些附加组件又定义了新的范围,并且会发生冲突。

在这种情况下,人们总是可以在不同的上下文路径或不同的端口上部署两场不同的战争。当然,您应该将项目分开,并为每个项目使用不同的 IDE 实例。但是,如果您的要求是让两个应用程序在同一服务器上运行,以便在它们之间轻松切换,那么它就可以达到此目的。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文