Code Monkey home page Code Monkey logo

reactive-ms-example's Introduction

Reactive MicroServices Example

Build Status

info

This is an example of doing reactive MicroServices using spring 5 functional web framework and spring boot 2.

This service provide and API that will greet the user with a quote.

This example cover several topics:

  • Functional programing.
  • Reactive types.
  • Router Functions.
  • Static Web-Content.
  • Creation on Reactive Java Services/Components.
  • Error handling in routes and services.
  • Reactive Web Client to consume external REST Services.
  • Organizing your project in manageable packaging.

Includes and in depth look to testing:

  • Unit, Integration and System tests.
  • Mocking, including reactive functions.
  • BDD style assertions.
  • Test categories and profiles.

usage

To run this service:

$ mvnw spring-boot:run

Sample requests

API

Run the API via the embedded Swagger UI

Project Structure

  • main/java
    • ReactiveMsApplication.java : Main Spring boot application.
    • ApplicationConfig.java : Spring Application Configuration and Beams.
    • /routers : Reactive routing functions.
    • /handlers : Handlers used by the routers.
    • /services : Services for the business logic needed by handlers.
    • /exceptions : Businesses exceptions.
    • /model : POJOs.
  • test/java:
    • ReactiveMsApplicationTest : System tests.
    • /routers : Integration tests for routes.
    • /handlers : Unit tests for handlers.
    • /services : Unit tests for services.
    • /categories : Tests categories.
    • /model : POJOs used by the test.
    • BasicIntegrationTest.java : Base class for integration testing
    • HandlerHelper.java : Helper function for handlers

References

reactive-ms-example's People

Contributors

jabrena avatar juan-medina avatar

Watchers

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