Giter Site home page Giter Site logo

spring_reactive_api's Introduction

Foo Reactive - Spring Boot application

The purpose of this project is to demonstrate how we can use Spring WebFlux to create a foo reactive web application that will emit data like foo resource with id and name every second.

How to build and run

project can be compiled with JDK 8.

To compile just do mvn clean package.

Prerequisites

  • JAVA 8 should be installed
  • Maven 3+

Technologies

Project is created with:

  • Java 8
  • Maven 3+
  • Spring boot

To run the application execute the following:

mvn spring-boot:run

The server will start at http://localhost:8080. After log in we can call http://localhost:8080/foo and http://localhost:8080/admin/foo rest apis, based on user permission it will return data.

We can test application through chrome with above url then do log in with below credentials based on role and hit below two endpoint that mention in exploring the Rest APIs. We can do log out with http://localhost:8080/logout url.

Credentials:

  • User

    username: user

    password: password

  • admin

    username: admin

    password: password

Exploring the Rest APIs

The application contains the following REST APIs

1. GET /foo - Get data with id and name that emit every second for user and admin
2. GET /admin/foo - Get data with id and name that emit every second for admin only.

Urls of above REST APIs.

  1. GET /foo - http://localhost:8080/foo
  2. GET /admin/foo - http://localhost:8080/admin/foo

spring_reactive_api's People

Contributors

sandeeppatel1986 avatar

Watchers

 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.