使用Vaadin 14尝试执行以下代码时,我遇到以下错误
UI current = UI.getCurrent();
Thread th = new Thread(() -> {
UI.setCurrent(current);
current.access(() -> {
//calling my service to save the data
current.push();
});
});
th.start();
我很少遇到上述错误,但需要将其删除,如UI中所示。