spring-projects / spring-session Goto Github PK
View Code? Open in Web Editor NEWSpring Session
Home Page: https://spring.io/projects/spring-session
License: Apache License 2.0
Spring Session
Home Page: https://spring.io/projects/spring-session
License: Apache License 2.0
If a SESSION cookie exists in multiple locations the wrong one may be used.
We may want to consider non Spring Applications by reducing the number of dependencies and providing a mechanism for configuring with Filter parameters.
This will make updating the dependencies easier
Hi Rob,
do you have an ETA for the first stable release of Spring Session? We are currently experimenting with blue-green deployments and consider to use Spring Session to solve the problem with lost sessions after switching the server. Our first tests with Spring Session 1.0.0.M1 worked without any problem ๐
Best regards,
Patrick
Hi Rob,
I wonder whether it is easily possible and useful to store the sessions in another database (MySQL/MariaDB in our case). We don't require high performance, we just want to store the user sessions at a central point.
Thanks a lot,
Patrick
This can simplify most configurations drastically
Serializable is an implementation detail and should be part of specific implementations.
This will allow supporting
With the current Redis implementation, we cannot guarantee when the session expiration event is received since Redis expiration makes no guarantees. This means we will need a new strategy.
One idea is to keep track of the session expirations like this:
spring-sessions:<RedisOperationsSessionRepository-id>:<timeout-in-minutes> -> [sessionid1, sessionid2, etc]
Such that:
A background task can then cleanup the sessions and fire events as needed.
Open questions:
In my case, I have some proxied session scope beans for Spring security oauth.
In some situations it may be nice to be able to query sessions by a user identifier (i.e. a username). This would be useful for displaying all the active sessions of a particular user.
We should provide hooks to keep the HttpSession alive when a message is received.
Depends On SPR-12288 to terminate the connection
References:
https://java.net/jira/browse/WEBSOCKET_SPEC-175
https://issues.apache.org/bugzilla/show_bug.cgi?id=54738
https://jira.spring.io/browse/SEC-2183
Is there an example somewhere of how to integrate spring-session for use as the session management utility for spring-security? I'd like to utilize the http header session management and redis backend, but with a standard spring-sec login mechanism.
Add a Spring Boot sample and make it the default in the README
Arjen: This would make it easier to navigate to the HttpSessionWrapper object when browsing the code. This would be useful since it is such a central class.
The API is in charge of returning wrapped request / response and passes in both the request / response
When getting started it's really nice to be able to poke around in the redis session store to see what is kept there. Some basic redis cli session examples would be helpful.
I am trying to create a simple spring security project with sessions backed by spring-session-redis so that for rest calls I can pass the session id and not have to pass user credentials on each call. I am using the HeaderHttpSessionStrategy for my sessionRepositoryFilter. For the first call I pass the user credentials which allow me to login successfully and the response includes the session id in x-auth-token header (as expected). In the second call I included the session id in x-auth-token header but the response is 401 unauthorized. So the session id is not being accepted.
I have created a sample project here https://github.com/adeelmahmood/restsession
Perhaps SessionRepository.getSession should be in charge of updating this value in the returned instance. The next SessionRepository.save would then persist the updated last LastAccessedTime. This would ensure we only persist the data in a save method and allow delaying the save so it can be done in a batch with any other attributes.
If you want to use a generic implementation of SessionRepository, it causes issues with saving at the moment. For example, the following will not work:
SessionRepository<? extends Session> repo = ..
Session session = repo.getSession(sessionId);
...
repo.save(session);
If we create a specific repository it cannot be wired using
@Autowired
SessionRepository<Session> repo;
since the generic type is different.
Adding Hazelcast to the list of session repository providers would be a great addition. This would be similar in style and implementation to RedisOperationsSessionRepository
but implemented using http://docs.hazelcast.org/docs/3.0/manual/html/ch02.html#Map instead. The implementation should be pretty straightforward but please let me know if you need assistance.
the important part of that was being able to query it - by more than key, query on the value objects, eg items in a basket over $20 or something or other criteria to help convert items in a cart to transactions.
Things we typically look for when getting a new datastore (looks like this is already pretty close):
@EnableMongoHttpSession
for making things easierWhat should happen if a session is already expired at the time it is retrieved? Likely we should return null.
We are currently using UIDs for session id generation. It may be better to include other characters to increase the entropy. We should be careful in how we use SecureRandom See https://www.synopsys.com/blogs/software-security/proper-use-of-javas-securerandom/ Last, we may want to make generating ids a strategy interface so that users can swap this out
Hi
I'm fiddling with M1 and found two issues. I created a spring boot application that demonstrates the problem: https://github.com/ralscha/session
The application uses the HeaderHttpSessionStrategy and the response contains the x-auth-token header when the response is json and smaller than the default response buffer size of 8192. (http://localhost:8080/big)
The response is missing the x-auth-token header when the response is bigger than 8192 (http://localhost:8080/bigger)
The same happens when the StringHttpMessageConverter is used.
(http://localhost:8080/string). In this case the size does not matter. Even a small response does not contain the x-auth-token
As a workaround for the first problem I can simply increase the buffer
response.setBufferSize(9000);
Found no workaround for the String problem.
Ralph
It would be awesome if different session attributes could have different TTLs set in Redis. For example keeping a Login for ages but something else in a user flow for 20mins.
Depends on #12
The sample app fails to run successfully using provided instrutions as shown here: https://github.com/spring-projects/spring-session#sample. Here is what I see when running on Ubuntu 14.
$ git clone https://github.com/spring-projects/spring-session.git
$ cd spring-session
$ ./gradlew tomcatRun
Downloading https://services.gradle.org/distributions/gradle-1.12-all.zip
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /home/userx/.gradle/wrapper/dists/gradle-1.12-all/2650hq37qpph364ivk299q86gl/gradle-1.12-all.zip to /home/userx/.gradle/wrapper/dists/gradle-1.12-all/2650hq37qpph364ivk299q86gl
Set executable permissions for: /home/userx/.gradle/wrapper/dists/gradle-1.12-all/2650hq37qpph364ivk299q86gl/gradle-1.12/bin/gradle
Download https://repo.spring.io/plugins-release/org/gradle/api/plugins/gradle-tomcat-plugin/1.2.3/gradle-tomcat-plugin-1.2.3.pom
Download https://repo.spring.io/plugins-release/org/springframework/build/gradle/propdeps-plugin/0.0.7/propdeps-plugin-0.0.7.pom
Download https://repo.spring.io/plugins-release/org/springframework/build/gradle/spring-io-plugin/0.0.3.RELEASE/spring-io-plugin-0.0.3.RELEASE.pom
Download https://repo.spring.io/plugins-release/me/champeau/gradle/gradle-javadoc-hotfix-plugin/0.1/gradle-javadoc-hotfix-plugin-0.1.pom
Download https://repo.spring.io/plugins-release/org/asciidoctor/asciidoctor-gradle-plugin/0.7.0/asciidoctor-gradle-plugin-0.7.0.pom
Download https://repo.spring.io/plugins-release/org/asciidoctor/asciidoctor-java-integration/0.1.4.preview.1/asciidoctor-java-integration-0.1.4.preview.1.pom
Download https://repo.spring.io/plugins-release/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
Download https://repo.spring.io/plugins-release/org/asciidoctor/asciidoctor-java-integration/0.1.4/asciidoctor-java-integration-0.1.4.pom
Download https://repo.spring.io/plugins-release/org/jruby/jruby-complete/1.7.4/jruby-complete-1.7.4.pom
Download https://repo.spring.io/plugins-release/org/jruby/shared/1.7.4/shared-1.7.4.pom
Download https://repo.spring.io/plugins-release/com/beust/jcommander/1.30/jcommander-1.30.pom
Download https://repo.spring.io/plugins-release/org/sonatype/oss/oss-parent/3/oss-parent-3.pom
Download https://repo.spring.io/plugins-release/org/gradle/api/plugins/gradle-tomcat-plugin/1.2.3/gradle-tomcat-plugin-1.2.3.jar
Download https://repo.spring.io/plugins-release/org/springframework/build/gradle/propdeps-plugin/0.0.7/propdeps-plugin-0.0.7.jar
Download https://repo.spring.io/plugins-release/org/springframework/build/gradle/spring-io-plugin/0.0.3.RELEASE/spring-io-plugin-0.0.3.RELEASE.jar
Download https://repo.spring.io/plugins-release/me/champeau/gradle/gradle-javadoc-hotfix-plugin/0.1/gradle-javadoc-hotfix-plugin-0.1.jar
Download https://repo.spring.io/plugins-release/org/asciidoctor/asciidoctor-gradle-plugin/0.7.0/asciidoctor-gradle-plugin-0.7.0.jar
Download https://repo.spring.io/plugins-release/org/asciidoctor/asciidoctor-java-integration/0.1.4/asciidoctor-java-integration-0.1.4.jar
Download https://repo.spring.io/plugins-release/org/jruby/jruby-complete/1.7.4/jruby-complete-1.7.4.jar
Download https://repo.spring.io/plugins-release/com/beust/jcommander/1.30/jcommander-1.30.jar
Download http://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.6.2.201302030002/org.jacoco.agent-0.6.2.201302030002.pom
Download http://repo1.maven.org/maven2/org/jacoco/org.jacoco.build/0.6.2.201302030002/org.jacoco.build-0.6.2.201302030002.pom
Download http://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.6.2.201302030002/org.jacoco.agent-0.6.2.201302030002-runtime.jar
:spring-session:compileJava
Download http://repo1.maven.org/maven2/org/springframework/data/spring-data-redis/1.3.0.RELEASE/spring-data-redis-1.3.0.RELEASE.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-tx/3.2.9.RELEASE/spring-tx-3.2.9.RELEASE.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-aop/3.2.9.RELEASE/spring-aop-3.2.9.RELEASE.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-context-support/3.2.9.RELEASE/spring-context-support-3.2.9.RELEASE.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-core/3.2.9.RELEASE/spring-core-3.2.9.RELEASE.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-context/3.2.9.RELEASE/spring-context-3.2.9.RELEASE.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-beans/3.2.9.RELEASE/spring-beans-3.2.9.RELEASE.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-expression/3.2.9.RELEASE/spring-expression-3.2.9.RELEASE.pom
Download http://repo1.maven.org/maven2/org/springframework/data/spring-data-redis/1.3.0.RELEASE/spring-data-redis-1.3.0.RELEASE.jar
Download http://repo1.maven.org/maven2/org/springframework/spring-tx/3.2.9.RELEASE/spring-tx-3.2.9.RELEASE.jar
Download http://repo1.maven.org/maven2/org/springframework/spring-aop/3.2.9.RELEASE/spring-aop-3.2.9.RELEASE.jar
Download http://repo1.maven.org/maven2/org/springframework/spring-context-support/3.2.9.RELEASE/spring-context-support-3.2.9.RELEASE.jar
Download http://repo1.maven.org/maven2/org/springframework/spring-core/3.2.9.RELEASE/spring-core-3.2.9.RELEASE.jar
Download http://repo1.maven.org/maven2/org/springframework/spring-context/3.2.9.RELEASE/spring-context-3.2.9.RELEASE.jar
Download http://repo1.maven.org/maven2/org/springframework/spring-beans/3.2.9.RELEASE/spring-beans-3.2.9.RELEASE.jar
Download http://repo1.maven.org/maven2/org/springframework/spring-expression/3.2.9.RELEASE/spring-expression-3.2.9.RELEASE.jar
Note: /apps/spring/spring-session/spring-session/src/main/java/org/springframework/session/web/http/SessionRepositoryFilter.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:spring-session:compileGroovy UP-TO-DATE
:spring-session:processResources UP-TO-DATE
:spring-session:classes
:spring-session:jar
:samples:web:compileJava
Download http://repo1.maven.org/maven2/org/springframework/spring-web/4.0.2.RELEASE/spring-web-4.0.2.RELEASE.pom
Download http://repo1.maven.org/maven2/redis/clients/jedis/2.4.1/jedis-2.4.1.pom
Download http://repo1.maven.org/maven2/org/apache/commons/commons-pool2/2.2/commons-pool2-2.2.pom
Download http://repo1.maven.org/maven2/org/apache/commons/commons-parent/33/commons-parent-33.pom
Download http://clojars.org/repo/redis/embedded/embedded-redis/0.2/embedded-redis-0.2.pom
Download http://repo1.maven.org/maven2/javax/servlet/jsp/jstl/javax.servlet.jsp.jstl-api/1.2.1/javax.servlet.jsp.jstl-api-1.2.1.pom
Download http://repo1.maven.org/maven2/org/apache/taglibs/taglibs-standard-jstlel/1.2.1/taglibs-standard-jstlel-1.2.1.pom
Download http://repo1.maven.org/maven2/org/apache/taglibs/taglibs-standard/1.2.1/taglibs-standard-1.2.1.pom
Download http://repo1.maven.org/maven2/org/apache/taglibs/taglibs-parent/3/taglibs-parent-3.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-aop/4.0.2.RELEASE/spring-aop-4.0.2.RELEASE.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-beans/4.0.2.RELEASE/spring-beans-4.0.2.RELEASE.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-context/4.0.2.RELEASE/spring-context-4.0.2.RELEASE.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-core/4.0.2.RELEASE/spring-core-4.0.2.RELEASE.pom
Download http://repo1.maven.org/maven2/com/google/guava/guava-io/r03/guava-io-r03.pom
Download http://repo1.maven.org/maven2/com/google/guava/guava-parent/r03/guava-parent-r03.pom
Download http://repo1.maven.org/maven2/com/google/google/5/google-5.pom
Download http://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.pom
Download http://repo1.maven.org/maven2/org/apache/commons/commons-parent/25/commons-parent-25.pom
Download http://repo1.maven.org/maven2/org/apache/taglibs/taglibs-standard-spec/1.2.1/taglibs-standard-spec-1.2.1.pom
Download http://repo1.maven.org/maven2/org/apache/taglibs/taglibs-standard-impl/1.2.1/taglibs-standard-impl-1.2.1.pom
Download http://repo1.maven.org/maven2/com/google/guava/guava-annotations/r03/guava-annotations-r03.pom
Download http://repo1.maven.org/maven2/com/google/guava/guava-base/r03/guava-base-r03.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-expression/4.0.2.RELEASE/spring-expression-4.0.2.RELEASE.pom
Download http://repo1.maven.org/maven2/org/springframework/spring-web/4.0.2.RELEASE/spring-web-4.0.2.RELEASE.jar
Download http://repo1.maven.org/maven2/redis/clients/jedis/2.4.1/jedis-2.4.1.jar
Download http://repo1.maven.org/maven2/org/apache/commons/commons-pool2/2.2/commons-pool2-2.2.jar
Download http://clojars.org/repo/redis/embedded/embedded-redis/0.2/embedded-redis-0.2.jar
Download http://repo1.maven.org/maven2/javax/servlet/jsp/jstl/javax.servlet.jsp.jstl-api/1.2.1/javax.servlet.jsp.jstl-api-1.2.1.jar
Download http://repo1.maven.org/maven2/org/apache/taglibs/taglibs-standard-jstlel/1.2.1/taglibs-standard-jstlel-1.2.1.jar
Download http://repo1.maven.org/maven2/org/springframework/spring-aop/4.0.2.RELEASE/spring-aop-4.0.2.RELEASE.jar
Download http://repo1.maven.org/maven2/org/springframework/spring-beans/4.0.2.RELEASE/spring-beans-4.0.2.RELEASE.jar
Download http://repo1.maven.org/maven2/org/springframework/spring-context/4.0.2.RELEASE/spring-context-4.0.2.RELEASE.jar
Download http://repo1.maven.org/maven2/org/springframework/spring-core/4.0.2.RELEASE/spring-core-4.0.2.RELEASE.jar
Download http://repo1.maven.org/maven2/com/google/guava/guava-io/r03/guava-io-r03.jar
Download http://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar
Download http://repo1.maven.org/maven2/org/apache/taglibs/taglibs-standard-spec/1.2.1/taglibs-standard-spec-1.2.1.jar
Download http://repo1.maven.org/maven2/org/apache/taglibs/taglibs-standard-impl/1.2.1/taglibs-standard-impl-1.2.1.jar
Download http://repo1.maven.org/maven2/com/google/guava/guava-annotations/r03/guava-annotations-r03.jar
Download http://repo1.maven.org/maven2/com/google/guava/guava-base/r03/guava-base-r03.jar
Download http://repo1.maven.org/maven2/org/springframework/spring-expression/4.0.2.RELEASE/spring-expression-4.0.2.RELEASE.jar
Note: /apps/spring/spring-session/samples/web/src/main/java/Config.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:samples:web:compileGroovy UP-TO-DATE
:samples:web:processResources UP-TO-DATE
:samples:web:classes
:samples:web:tomcatRun
Download http://repo1.maven.org/maven2/org/apache/tomcat/embed/tomcat-embed-jasper/7.0.54/tomcat-embed-jasper-7.0.54.pom
Download http://repo1.maven.org/maven2/org/apache/tomcat/embed/tomcat-embed-jasper/7.0.54/tomcat-embed-jasper-7.0.54.jar
Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sessionRepository' defined in class Config: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.data.redis.core.RedisTemplate]: : No qualifying bean of type [org.springframework.data.redis.core.RedisTemplate] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.data.redis.core.RedisTemplate] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:462)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1094)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:989)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4971)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.data.redis.core.RedisTemplate] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1100)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:960)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:855)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:805)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:733)
... 24 more
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sessionRepository' defined in class Config: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.data.redis.core.RedisTemplate]: : No qualifying bean of type [org.springframework.data.redis.core.RedisTemplate] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.data.redis.core.RedisTemplate] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:462)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1094)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:989)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4971)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.data.redis.core.RedisTemplate] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1100)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:960)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:855)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:805)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:733)
... 24 more
Error listenerStart
Context [] startup failed due to previous errors
.. Using a JMX metric ideally. Very useful when you want to make sure the session size doesn't go out of hand when using frameworks like Vaadin or gwt
Consider adding HttpSessionListener Support.
Depending on the implementation this may be impossible to reliably support. For example, while we can receive expiration notifications from Redis, there are no guarantees on when the expiration event will be sent.
Depends On #45
Documentation talks about multiple sessions. Is there an example or documentation out there for something along those lines.
Move items that require Spring Data into a data package (i.e. session.data.redis)
When a client is using sticky sessions, there could be certain optimizations we could perform.
One scenario that we could consider is that we could write asynchronously to a datastore and use a local cache for reads. NOTE that this would cause issues if we have multiple sources writing to the database.
Extending this class will automatically register the SessionRepositoryFilter with the Servlet container drastically reducing the boiler plate code necessary to use Spring Session.
This ensures that only a single session id is returned
It is difficult to use SessionRepository with the generics support right now. We need to figure a way to clean this up.
NOTE: Ideally we would only allow a Session instance that is created by the SessionRepository to be saved by that SessionRepository.
The first round of WebSocket support will check on each message to determine if the Session is still alive. This won't scale (particularly on outbound requests) well. Instead, we should detecting an Event of when the Session expires (#45) and then disconnect the WebSocket connection (depends on SPR-12288)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.