运行vaadin与vaadin-8一起流动
我有一个可用的 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果应用程序未使用 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.