Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin + Spring Security
I trying to follow this sample: https://vaadin.com/blog/-/blogs/a-hybrid-approach-to-spring-security-in-vaadin-applications
but when I try to use in my app in this method:
private static VaadinSession getSession() {
VaadinSession session = VaadinSession.getCurrent();
if (session == null) {
session = new VaadinSession(VaadinService.getCurrent());
}
return session;
}
my session always return null, I already try with @PreserveOnRefresh without, put in properties:
server.session.timeout=60
vaadin.servlet.close-idle-sessions=true
vaadin.servlet.heartbeat-interval=15
and my session still null.
And another doubt are, I have one view with my Login, so how I say that /#!Login are free for show?
tks
Where are you trying to use the getSession() method? The VaadinSession.getCurrent() works only when there is an active http request.
cheers,
matti