Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Missing docs: custom SessionInitListener with Vaadin-Spring #1395

Open
mvysny opened this issue Nov 23, 2020 · 1 comment
Open

Missing docs: custom SessionInitListener with Vaadin-Spring #1395

mvysny opened this issue Nov 23, 2020 · 1 comment

Comments

@mvysny
Copy link
Member

mvysny commented Nov 23, 2020

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

@mvysny mvysny changed the title Missing docs: how to add SessionInitListener when using Spring Missing docs: custom SessionInitListener with Vaadin-Spring Nov 23, 2020
@jcgueriaud1
Copy link
Contributor

jcgueriaud1 commented Nov 23, 2020

You can use this:

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants