I tried the following snippet that results in a somehow endless loop:
public class MyUI extends UI {
@Override
protected void init(VaadinRequest request) {
super.init(request);
System.out.println("Hello UI");
}
@WebServlet(value = "/*", name = "vaadinServlet")
@VaadinServletConfiguration(ui = MyUI.class, productionMode = false)
public static class MyServlet extends VaadinServlet {
}
}
Any idea how I should configure a custom UI class in Vaadin Flow?
Any help will be appreciated!
Strangewise we found that
public class MyUI extends UI {
@Override
protected void init(VaadinRequest request) {
System.out.println("Hello UI");
}
@WebServlet(urlPatterns = "/*", name = "vaadinServlet", asyncSupported = true)
// @VaadinServletConfiguration(ui = MyUI.class, productionMode = false)
public static class MyServlet extends VaadinServlet {
}
}
leaving out the VaadinServletConfiguration makes it work! (?)