754 questions
Score of -1
0 answers
177 views
Spring STOMP error at 'CONNECT' when both EnableWebSocketSecurity and HeaderHttpSessionIdResolver used
I made a demo project that integrates Spring Security, Spring Session, Spring Websocket, with the HeaderHttpSessionIdResolver bean enabling HTTP header session ID resolving to avoid cookies, upgraded ...
Best practices
0
votes
0
replies
126
views
SpringBoot solution for session metrics
We have noticed that the following Tomcat session metrics are no longer being tracked after adding the org.springframework.session:spring-session-data-redis dependency :
...
Advice
2
votes
0
replies
107
views
What's the difference between server.servlet.session.timeout, server.servlet.session.max-age and spring.session.timeout?
I followed this tutorial to get my authentication session up and running. However, I am unsure of the differences between spring.session.timeout, server.servlet.session.timeout and server.servlet....
Best practices
0
votes
1
replies
45
views
What's the proper way to use the spring.session.jdbc.initialize-schema property?
I'm using a spring application that uses spring sessions. The application auto-scales based on the traffic (fairly standard approach), so it starts up quite often (a few thousand times per week).
I'm ...
Score of 1
2 answers
227 views
Spring Boot 4 tests not creating session cookie (springSessionRepositoryFilter missing from filter chain)
I am doing something like the following in a Spring Boot test.
@Test
void givenAuthenticated_whenDeleteSession_return204() throws Exception {
final String manager = ORG_MANAGER_EMAIL;
...
Score of 0
1 answer
181 views
Spring Boot session not saving to SPRING_SESSION table
Spring seems to be creating a session, and saving my session variable in memory. But when I check the SPRING_SESSION (and SPRING_SESSION_ATTRIBUTES) table(s), there is never an entry.
pom.xml ...
Score of 0
0 answers
81 views
Vaadin 23 Flow session not expiring when Spring Session JDBC session expires
I have a multi-project setup with a Spring back-end and a Vaadin 23 Flow front-end. I'm trying to synchronize the session lifecycles so that when the back-end session expires, the Vaadin UI correctly ...
Score of 1
0 answers
96 views
Share Spring Session between Spring MVC and WebFlux apps via Redis
I'm trying to share the HTTP session between a Spring MVC (Servlet-based) application and a Spring WebFlux application using Spring Session backed by Redis.
What I'm trying to achieve:
A user ...
Score of 0
0 answers
175 views
Spring Boot session cookie not being sent in Chrome, but works in Firefox (SameSite issue?)
I'm building a full-stack application with:
nextjs: job-portal
springboot: backend-api
I'm using session-based authentication in spring boot. After logging in (via standard username/password), the ...
Score of 1
1 answer
96 views
Vaadin23 app keeps refreshing repeatedly when using Spring Session JDBC
I'm building a Vaadin 23 + Spring Boot 2.7 application and trying to integrate Spring Session JDBC to expire sessions after 1 minute of inactivity.
Problem:
When I start the app, the browser (...
Score of 0
1 answer
147 views
OAuth2Authentication token serializing by spring session with redis
I am using spring session for redis for my oauth2 login. I have implemented a custom principal.
@Data
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public final class ...
Score of 0
0 answers
47 views
How to get window/session based user context object in Filter class to setup inital user data in Springboot
I have a Usercontext Bean which is session based bean. UserContext has reference to User cache field which is window based.
We have windowscope Bean which has userContext reference.
I want to get User ...
Score of 1
1 answer
504 views
How can I use @ServiceConnection with Redis Testcontainers for Spring Session Redis?
My application involves using Spring Session Redis to handle authenticated sessions across the application.
Spring Session Redis is configured as-per the docs.
@Configuration
@EnableRedisHttpSession
...
Score of 1
1 answer
163 views
Session not persisted between Spring Boot (Spring Session + MySQL) and Angular frontend
I am using Spring Boot 2.7.18 with Spring Session and MySQL to store sessions in the database, and my frontend is built with Angular. After logging in and being redirected back to my Angular app, the ...
Score of 0
0 answers
114 views
Spring Security with Spring Session can't correctly find the session after application restart
I'm implementing Spring Security with Spring Session for my cloud based application.
Everything works correctly, the integration with Spring Session as well. But if I restart my application (For ...