Giter Club home page Giter Club logo

springboot-mongodb-redis-example's Introduction

Spring boot + Mongodb + Redis (for Caching) Example


Prerequisites:

  1. Redis server must be running at port 6379
  2. Mongodb server must be running at port 27017

How to use the demo?

  1. Import the project into Eclipse
  2. Do a maven update
  3. Run com.kvinod.App class
  4. Use a browser to visit http://localhost:2233/api/users
  5. Using one of the user's id, make another request (e.g, http://localhost:2233/api/users/5d876248a0b7a0fde2b490f9)
    1. You should see some mongodb logs on Eclipse console
    2. Refresh the browser multiple times, but no logs to be displayed on Eclipse console
    3. You may even stop mongodb server and refresh the browser, and still get data (cached in Redis)
    4. While the mongodb has stopped, if you make request for any other id, you must get error 500

springboot-mongodb-redis-example's People

Contributors

vinod-kayartaya avatar

Watchers

James Cloos avatar

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.