Code Monkey home page Code Monkey logo

spring-session's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spring-session's Issues

Consider non Spring Applications

We may want to consider non Spring Applications by reducing the number of dependencies and providing a mechanism for configuring with Filter parameters.

ETA for first spring-session release

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

Using another database as session store

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

Support receiving Session expiration events

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:

  • RedisOperationsSessionRepository-id - is a unique id per RedisOperationsSessionRepository instance. This ensures that each RedisOperationsSessionRepository instance cleans up only sessions it created. It will also allow us to use the event as a way of closing the websocket connection for #44
  • timeout-in-minutes - this is the time that the session will expire at (rounded up to nearest minute)

A background task can then cleanup the sessions and fire events as needed.

Open questions:

  • Sessions may be updated by other RedisOperationsSessionRepository instances, so how do we deal with that?
  • How to we guarantee a session gets cleaned up if a server is taken down?

Spring Security integration

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.

SessionRepositoryFilter should use a single API

The API is in charge of returning wrapped request / response and passes in both the request / response

  • For the HTTP layer we want to be able to have access to the HttpServletRequest and HttpServletResponse. This makes it nice to be able to write the Session to a cookie for example.
  • We want to be able to customize the wrapping of the HttpServletRequest / HttpServletResponse so that we could perform URL rewriting (i.e. indicate which session is currently being used in the event there were multiple users authenticated at a time)

not able to retrieve previous session for rest calls

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

Remove Session.setLastAccessedTime

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.

SessionRepository generics issues

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.

Add MongoOperationsSessionRepository

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):

  • Code (obviously)
  • Unit tests
  • Integration tests (fewer than the unit tests for speed but still ensure things are working)
  • Hello World Sample / Guide for Web Application (i.e. HttpSession Sample)
  • Sample Tests
  • Optional @EnableMongoHttpSession for making things easier
  • Optional spring-session-mongo pom that aggregates the dependencies to make dependency management for users easier

Header not set when response is bigger than bufferSize

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

Independent Attribute TTL

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.

Sample App Fails: No qualifying bean of type RedisTemplate

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

Provide a way to get session size

.. 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

Add HttpSessionListener Support

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

multiple sessions

Documentation talks about multiple sessions. Is there an example or documentation out there for something along those lines.

Support Sticky Sessions

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.

SessionRepository Generics

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.