GithubHelp home page GithubHelp logo

manju07 / java-spring-boot-microservice-app Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 208 KB

Sample microservice architecture application using java8, spring boot, and spring cloud.

Shell 1.91% Dockerfile 0.74% Java 97.35%
java8 spring-boot spring-cloud microservices microservices-application zuul-api-gateway cloud-config-repo cloud-config eureka-discovery-service eureka-server docker docker-compose docker-images mysql lombok maven spring-security-oauth2 oauth2-server kubernetes spring-security

java-spring-boot-microservice-app's Introduction

Microservice Application

This application is built on Spring Boot, Spring Cloud, Cloud-Config, Eureka Naming server, Zuual API gateway, OAuth-2, Swagger, and MySql DB.

Note:

  • We are using a GitHub repo for managing service config properties files. please clone below repo before running this application locally - github repo link

  • To run MySql locally with docker, please refer to this document, it is part of this repo java-spring-boot-microservice-app/dbSetup.md

Microservices

cloud-config-server

This will provide the service config property during runtime basis on the environment/configured at the service level.

As you are cloning the repo, you need to specify the repo path in this file cloud-config-server/src/main/resources/application-dev.properties.

spring.cloud.config.server.git.uri=file:/path_to_git_repo

eureka-naming Server

We register all our microservices to track the health status and provide other service details for communication.

oauth2-authentication-server

This will perform the authentication and authorization based on roles assigned to the users.

user-service

This will be managing the users across all corporates on the basis of roles.

group-service

This will be managing the badges, and teams for all corporates.

zuul-api-gateway Server

This is a publicly exposed service, all requests are routed to different services one based on regex.

How to set up locally?

  • Dependencies for local setup - Visual Code/IntelliJ/Eclipse, Maven, JDK8, MySql Database, Docker, Thunderclient/Postman.

  • We are using a GitHub repo for managing service config properties files. please clone the below repo before running this application locally.

  • DB Setup - To run MySql locally with docker, please refer to this document which is part of this repo java-spring-boot-microservice-app/dbSetup.md

  • 2 ways to run this application.

    • Docker thru

      • Get into the main directory folder, and run the command "mvn clean package". this will build all modules and docker images. then execute run.sh.
    • Spring boot thru

      • Run each service in the below order.
        • cloud-config-server
        • eureka-naming-server
        • oauth2-authentication-server
        • group-service
        • user-service
        • zuul-api-gateway-server
  • You can test by checking this swagger - http://localhost:8765/swagger-ui.html

Important Resources

  • Postman Collections - java-spring-boot-microservice-app/postman-collection_sample-app_postman.json

  • Thunderclient Collections - java-spring-boot-microservice-app/thunder-collection_sample-app.json

  • Swagger Documentation - http://localhost:8765/swagger-ui.html

Author - Manjunath Asundi
EmailId:[email protected]

java-spring-boot-microservice-app's People

Contributors

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