Spring Boot 和 Vaadin 7 - 设置会话超时无效

Spring Boot and Vaadin 7 - setting session timeout has no effect

我正在使用带有 Spring Boot 1.2 的 Vaadin 7.3.9。1.RELEASE 我想将我的应用程序的会话超时设置为 15 分钟。

现在我正在做以下事情:

在application.properties

#session timeout in seconds
server.sessionTimeout=900

在 Vaadin Servlet 配置中:

@VaadinServletConfiguration(productionMode = false, ui = AppUI.class, closeIdleSessions = true)
public class AppServlet extends VaadinServlet {
}

然后我用它做了一个豆子:

@Configuration
public class ServletConfiguration {
  @Bean
  public ServletRegistrationBean vaadin() {
    return new ServletRegistrationBean(new AppServlet(), "/app/*", "/VAADIN/*");
  }
}

我也遵循 Book of Vaadin

的规则

The session timeout should be longer than the heartbeat interval or otherwise sessions are closed before the heartbeat can keep them alive.

我没有设置此参数,因此应用默认值(再次来自 Book of Vaadin):

The interval of the heartbeat requests can be specified in seconds with the heartbeatInterval parameter either as a context parameter for the entire web application or an init parameter for the individual servlet. The default value is 300 seconds (5 minutes).

不幸的是,15 分钟后应用程序仍然存在。我做错了什么?

我设法找出问题所在。我在我的应用程序中使用进度条,所以我在全局设置了轮询间隔。在进度发生之前将其打开并在工作完成后关闭就足够了 - 无需一直保持打开状态。

这意味着上面的代码做了我期望的事情。