Skip to content

Commit

Permalink
Implemented Spring Session
Browse files Browse the repository at this point in the history
Some fix to connect to redis server

Config now with spring.session.store-type

Added a fix for a bug with the RedisHttpSessionConfiguration

Updated the spring-boot-starter-redis to spring-boot-starter-data-redis

Store-type in local null (terraform updated for redis)

Removed unnecessary change from application.yml
  • Loading branch information
nlep1367 committed Apr 27, 2017
1 parent bd73af4 commit 0275a1b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sample-isv-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>

<!-- Spring Session Dependencies. -->
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.appdirect.isv.config.security;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.session.data.redis.config.ConfigureRedisAction;

@Configuration
public class RedisSessionConfiguration {
@Bean
public static ConfigureRedisAction configureRedisAction() {
// Fixing a bug with the RedisHttpSessionConfiguration when Redis is not protected by a password
return ConfigureRedisAction.NO_OP;
}
}
2 changes: 2 additions & 0 deletions sample-isv-web/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ server:
port: 9080

spring:
session:
store-type: none
datasource:
url: jdbc:mysql://localhost/isv
username: root
Expand Down

0 comments on commit 0275a1b

Please sign in to comment.