vaadin/flow-and-components-documentation

Missing docs: custom SessionInitListener with Vaadin-Spring

mvysny opened this issue · 1 comments

Would be good to have an example on how to register app-specific SessionInitListener when running Vaadin on Spring.

You can use this:

@Component
public class CustomServiceInitListener implements VaadinServiceInitListener {
   @Override
   public void serviceInit(ServiceInitEvent event) {
      event.getSource().addSessionInitListener(event1 -> {
         // do something
      });
   }
}