Questions tagged [spring-session]

Spring Session provides a common infrastructure for managing user’s session information.

Spring Session provides a common infrastructure for managing user’s session information. This provides many Benefits including:

  • Accessing a session from any environment (i.e. web, messaging infrastructure, etc)

  • In a web environment

    • Support for clustering in a vendor neutral way

    • Pluggable strategy for determining the session id

    • Easily keep the HttpSession alive when a WebSocket is active

Resources

748 questions
7
votes
2 answers

Migrating HttpSessionListener after adopting spring-sessions

We recently started using spring-session in our project. This is a legacy application and we have some HttpSessionListener. So when the session is expired or user invalidates the session sessionDestroyed(HttpSessionEvent se) method is called. You…
Palanivelrajan
  • 121
  • 1
  • 10
6
votes
0 answers

Maintain user's session (HttpSession) after login in Spring Boot application

I'm creating a simple hotel reservation web application in Spring. Currently, I'm building the actual implementation of booking functionality, employing HttpSession to store data between requests to the server. Please find the reservation flow…
maciejd
  • 173
  • 3
  • 12
6
votes
2 answers

How to initialize schema in spring-session with JDBC

I'm using Spring Boot 2.0.x, Hibernate and Spring Session Jdbc with Mysql 5.7. I'm working under development environment, so Hibernate is configured to generate schemas every time: spring.jpa.hibernate.ddl-auto=create-drop And it works fine, but I…
jswieca
  • 115
  • 1
  • 2
  • 12
6
votes
3 answers

Put user in HttpSession with Spring Security default login and authenticate

I precise that I am a french student in 1st year of Java Developper. I'm developing a little multi-module app using: Spring Boot, Spring security, Hibernate, Spring Data, Spring MVC and Thymeleaf. I would like to set the User in the session, or at…
6
votes
1 answer

Spring jdbcSession : Not able to serialize JsonNode

I am trying to store a JsonNode to my spring jdbc session, while when the data is set and ready to insert to database by spring, ConversionFailedException was throw. I tried the same as mentioned in below, but is not working though. No converter…
brian661
  • 538
  • 3
  • 11
  • 31
6
votes
2 answers

How to resolve java error: package javax.annotation is not visible, Java version 9

When building below Spring session sample using gradle: https://docs.spring.io/spring-session/docs/current/reference/html5/guides/boot-findbyusername.html I encountered an error regarding to java.annotation module, anybody have idea how to resolve…
Ryan Cy
  • 101
  • 2
  • 4
6
votes
1 answer

How to prevent Redis writes for anonymous user sessions

I have this sample application: package com.example.session; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; import…
6
votes
1 answer

How to use Spring WebSessionIdResolver with Spring Security 5 in a Spring webflux application?

Currently I was experiencing the new Spring reactive stack, and want to use reactive features in Spring Session 2.0. In traditional Servlet approach, Spring Session provides a HttpSessionStrategy to detect session in cookie or request headers. It is…
6
votes
1 answer

Is there any EOL( end of life) and EOVS( end of vendor support) dates for spring libs?

Is there any EOL( end of life) and EOVS( end of vendor support) dates for spring libs like spring boot, spring cloud, spring session etc? If yes where can I find these information for each version of libs?
Sanket Gupta
  • 75
  • 1
  • 9
6
votes
1 answer

Spring Session & Spring Security - session timeout handling not working

When attempting to add spring-session to an existing Spring MVC project with spring-security, I get the following behavior (EDIT: with tomcat's session-timeout set to 1 minute for testing): With the springSessionRepositoryFilter filter in web.xml…
mrusinak
  • 1,002
  • 1
  • 12
  • 22
6
votes
3 answers

Spring Sessions HttpSession unable to completely replace JSESSIONID

I am looking at moving user session from the application level to a Redis instance. I believe I have everything set up correctly according to the documentation (http://docs.spring.io/spring-session/docs/current/reference/html5/#httpsession), but I'm…
Dave4988
  • 705
  • 1
  • 12
  • 20
6
votes
1 answer

Specify which logical database to use with spring-data-redis

I'm using spring-data-redis, spring-session and Spring Boot to connect to my Redis instance. However I would like spring-data-redis to connect not to DB 0 (which is default) but to another local database (say DB 1). This is where I'd like the…
Johan
  • 37,479
  • 32
  • 149
  • 237
6
votes
0 answers

How to persist spring sessions into custom back-end data store

I have a spring MVC web application, I have java classes that I have annotated with @Scope("session") and currently running it on tomcat. The classes annotated with the scope store user information that I don't want to lose in case the server…
tigg
  • 107
  • 8
6
votes
1 answer

Spring Session Redis and Spring Security how to update user session?

I am building a spring REST web application using spring boot, spring secuirity, and spring session (redis). I am building a cloud application following the gateway pattern using spring cloud and zuul proxy. Within this pattern I am using spring…
6
votes
1 answer

Spring security OAuth2 authentication and form login in one app

Is it possible to combine authoryzation and authentication by login basic and by oauth2 in one application? My project is based on jhipster project with simple spring security session login, now i need add oauth2 security for mobile app and it's…
1 2
3
49 50