2017-05-30 58 views
0

我正在使用Spring Boot 1.5.3.RELEASE和Vaadin 8.0.6。我也使用Spring Security。我注意到,每次使用上傳組件上傳文件時,都會收到會話過期消息。有沒有辦法配置以避免過期?我做了這個變化,但並沒有幫助」Vaadin會話超時上載

@Bean 
MultipartConfigElement multipartConfigElement() { 
    MultipartConfigFactory factory = new MultipartConfigFactory(); 
    factory.setMaxFileSize(10 * 1024 * 1024); 
    factory.setMaxRequestSize(10 * 1024 * 1024); 
    factory.setFileSizeThreshold(10 * 1024 * 1024); 

    return factory.createMultipartConfig(); 
} 

回答

0

春季啓動1.4及以上:
的src /主/資源/ application.properties中放置

添加在幾秒鐘內server.session.timeout =#會話超時。

參考在到SEESION相關的所有屬性

嘗試下面也

在web.xml中添加以下會話配置。

<session-config> 
    <session-timeout>20</session-timeout> 
</session-config>