0

I am using Spring Boot 1.5.3.RELEASE with Vaadin 8.0.6. I am using Spring Security as well. I noticed that every time I upload a file using the Upload component, I get a Session Expired message. Is there a way to configure to avoid the expiry? I made this change but didn't help"

@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();
}
samyem
  • 437
  • 5
  • 16

1 Answers1

0

For Spring Boot 1.4 and above :
In the src/main/resources/application.properties to be placed.

Add server.session.timeout= # Session timeout in seconds.

Refer all properties related to seesion at https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html

Try below too,

adding below session config in web.xml.

<session-config>
    <session-timeout>20</session-timeout>
</session-config>
RoshanKumar Mutha
  • 2,235
  • 1
  • 12
  • 13