vaadin - Vaadin 10+: How can I disable Router?
问题描述
I'm trying to migrate a Vaadin 8 application to Vaadin 11.
I'm trying to use VaadinServlet and UI:
@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = TestUi.class)
public class TestServlet extends VaadinServlet {
}
public class TestUi extends UI {
@Override
protected void init(VaadinRequest request) {
add(new Label("Test"));
}
}
I get:
Can / do I have to disable Router?
I double checked, there is no class annotated with @Route.
Update: The migration guide states:
So I am still confused about why and where I am supposed to put the Route annotation in this scenario.
解决方案
您需要@Route
在 Vaadin 10 中至少拥有一个。由于您正在迁移,您可能需要在此处查看文档:https ://vaadin.com/docs/v10/flow/migration/1-migrating-v8-v10 .html
推荐阅读
- ms-access - Access 2007 数据库中的表单缺少标签和字段
- angular - Angular CLI 的任何选项都可以在运行“ng g component”时将 ngOnDestory 添加到组件中
- python - Flask-Babel localeselector 没有被调用
- android - 颤振运行未完成
- azure-data-factory - GetMetadata 获取 Azure 数据工厂中的完整文件目录
- performance - 访问主存的延迟几乎与发送数据包的顺序相同
- sql-server - 使用 STRING_AGG 选择不同的值
- c# - ASP.NET Core Web API 错误请求
- python - 尝试从站点打印 HREF 标记并得到奇怪的结果
- java - 使用 EntityGraph 时 DTO 会导致 QueryException