spring
spring copied to clipboard
Provide a way of overriding the servlet with a custom implementation
trafficstars
Currently with Spring Boot, the VaadinServlet is registered in Spring Boot autoconfiguration. In cases where you would like to create custom Servlet (for example a custom session destroy listener), there's no documented way of overriding the servlet with your custom implementation.
Could also be noted that nowadays, you don't need to have a custom servlet for adding a custom session destroy listener. You can instead use a VaadinServiceInitListener. With Spring, you can just make your implementation available as a Spring bean, and it will automatically be used by the framework.