GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - maxiplay/SpringCloudRedisSessionExample: Spring Cloud Redis Session Example

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
auth-redis-based
auth-redis-based
 
 
book-ms
book-ms
 
 
common
common
 
 
gateway
gateway
 
 
parent-project
parent-project
 
 
registry-server
registry-server
 
 
resources/datas
resources/datas
 
 
user-data-model
user-data-model
 
 
.gitignore
.gitignore
 
 
README.adoc
README.adoc
 
 
testfile
testfile
 
 

Repository files navigation

Spring cloud Redis Session Example

Date

Version

Author

Comment

may-2016

1.0

M. Dhalluin

Init

Important
The using Spring Cloud version for this project is Brixton.RELEASE

Introduction

This project is a simple example of Spring Cloud implementation using Redis shared session

Enjoy it

Getting started

Prerequisites :

Install the following tools in order to run the project.

  • JDK8

  • MAVEN

  • MONGODB

  • REDIS

Get the project :

git clone https://github.com/maxiplay/SpringCloudRedisSessionExample

Go to the project root folder and :

Install the parent project

mvn install -f parent-project/

Build the authentication dependency

mvn install -f auth-redis-based/

Install the micro-service common dependency

mvn install -f common/

Build and start the registry server

mvn install -f registry-server/ && java -jar registry-server/target/registry-server-0.0.1-SNAPSHOT.jar

Build and start the book micro-service example

mvn install -f book-ms/ && java -jar book-ms/target/book-ms-0.0.1-SNAPSHOT.jar

Build and start the zuul proxy

mvn install -f gateway/ && java -jar gateway/target/gateway-0.0.1-SNAPSHOT.jar

Go to the project root folder and inject data into database :

mongoimport --db test --collection docs --file resources/datas/book.json
mongoimport --db test --collection docs --file resources/datas/user.json

Open you browser and navigate to http://localhost:7080

Now you have a micro-service architecture with a registry server (registry-server), a Zuul proxy (gateway), a micro-service example (book-ms).

Authenticate with the right top button and type

login: max3, password : maxmax

The webapp contained in the gateway is able to list books from the book-ms microservice clicking to the link "My Books"

Important
If Redis shared session works fine, you should have the list of books displayed. If not, verify the ajax request to get book (401 error if Redis shared session does not work. At first loading retry with F5, hystrix can trigger a timeout if the request takes too long time due to the startup)

About

Spring Cloud Redis Session Example

Resources

Readme
Activity

Stars

6 stars

Watchers

2 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.