Giter Club home page Giter Club logo

nasruddin / spring-boot-based-microservices Goto Github PK

View Code? Open in Web Editor NEW
172.0 7.0 64.0 2.01 MB

Basic skeleton for Spring Boot Microservices. It includes spring spring security for basic Auth. Spring Cloud Gateway is also implemented as an API gateway. Lots of the spring cloud component integrated. UI component for the same can be found here: https://github.com/Nasruddin/angular-based-microservice

Home Page: http://javatab.wordpress.com

Java 91.05% Dockerfile 7.17% Shell 1.78%
jwt spring-security eureka-server eureka-client sleuth netflix config-server spring-boot spring-cloud microservices

spring-boot-based-microservices's Introduction

spring-boot-based-microservices

Basic skeleton for Spring Boot Microservices. It includes spring security for basic Auth. Spring cloud gateway is also implemented as an Edge Service. Lots of the spring cloud component integrated.

How to run

  • Navigate to root of the project
    cd spring-boot-based-microservices
  • Build the project
    mvn clean package -DskipTests     

Maven Build

  • Locate the docker directory from the root directory and run docker compose to startup the containers
    cd docker && docker-compose up --build

Docker Compose Build

  • Check if all our services are running and healthy
    docker ps

Docker PS

  • Let's check if all the services are up and running. We will reach to eureka server using gateway. Open the browser and hit http://localhost:8443/eureka/web You will need to authenticate yourself before accessing the endpoint.
username : user
password : password

Eureka

curl -k http://writer:secret-writer@localhost:8443/oauth2/token -d grant_type=client_credentials -d scope="course:read course:write" 

Swagger OpenApi Specs Swagger OpenApi Specs

Note : Currently this project uses Spring Authorization server. Keep in mind, I'm planning to enhance the whole OAuth flow because it's in shaky state right now and, you may some face issues. We may also move to keycloak.

These instructions are basic starting point and, the project does lot of other stuff like elastic and mongo configuration etc. Please feel free to play around. I really want to maintain this and keep up-to-date, however my current role doesn't give me enough spare time. Therefore, contributors and their contributions are welcome :)

spring-boot-based-microservices's People

Contributors

dependabot[bot] avatar nasruddin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

spring-boot-based-microservices's Issues

[ERROR] Some problems were encountered while processing the POMs

mvn clean package -DskipTests on master branch:

[ERROR]     Child module /spring-boot-based-microservices/spring-cloud/eureka-server/pom.xml of /spring-boot-based-microservices/pom.xml does not exist
[ERROR]     Child module /spring-boot-based-microservices/spring-cloud/gateway/pom.xml of /spring-boot-based-microservices/pom.xml does not exist
[ERROR]     Child module /spring-boot-based-microservices/spring-cloud/authorization-server/pom.xml of /spring-boot-based-microservices/pom.xml does not exist
[ERROR]     Child module /spring-boot-based-microservices/spring-cloud/config-server/pom.xml of /spring-boot-based-microservices/pom.xml does not exist

No of the project spring-cloud have pom.xml

/Users/keskuma2/Library/Java/JavaVirtualMachines/corretto-17.0.4.1/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Users/keskuma2/IdeaProjects/spring-boot-based-microservices -Dmaven.home=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3 -Dclassworlds.conf=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin/m2.conf -Dmaven.ext.class.path=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=59623:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds.license:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version=2022.1.3 clean
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Child module /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/spring-cloud/eureka-server/pom.xml of /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/pom.xml does not exist @
[ERROR] Child module /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/spring-cloud/gateway/pom.xml of /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/pom.xml does not exist @
[ERROR] Child module /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/spring-cloud/authorization-server/pom.xml of /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/pom.xml does not exist @
[ERROR] Child module /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/spring-cloud/config-server/pom.xml of /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/pom.xml does not exist @
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project io.javatab.microservices:student-course-system:1.0.0 (/Users/keskuma2/IdeaProjects/spring-boot-based-microservices/pom.xml) has 4 errors
[ERROR] Child module /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/spring-cloud/eureka-server/pom.xml of /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/pom.xml does not exist
[ERROR] Child module /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/spring-cloud/gateway/pom.xml of /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/pom.xml does not exist
[ERROR] Child module /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/spring-cloud/authorization-server/pom.xml of /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/pom.xml does not exist
[ERROR] Child module /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/spring-cloud/config-server/pom.xml of /Users/keskuma2/IdeaProjects/spring-boot-based-microservices/pom.xml does not exist
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

Process finished with exit code 1

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.