首页 > 解决方案 > 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:

enter image description here

Can / do I have to disable Router?

I double checked, there is no class annotated with @Route.

Update: The migration guide states: enter image description here

So I am still confused about why and where I am supposed to put the Route annotation in this scenario.

标签: vaadinvaadin10

解决方案


您需要@Route在 Vaadin 10 中至少拥有一个。由于您正在迁移,您可能需要在此处查看文档:https ://vaadin.com/docs/v10/flow/migration/1-migrating-v8-v10 .html


推荐阅读