Code Monkey home page Code Monkey logo

microservice-reference-project's Introduction

Microservice Reference Project

This project is inspired by the idea to quickly create a production ready project with all the required infrastructure at low cost yet with important security measures in place and ability to quickly scale in order to ship a quality product to early adopters. Ideal for quickly starting an app to validate ideas and scale if needed. The implementation includes code samples for different features. It uses Spring as the framework of choice because it provides a nice set of convenience features when bootstrapping and plugging together the application.

πŸ“‘ Prerequisites:

By default, the project uses JDK 8, but will also work with JDK 11 and above.


πŸ”– Build and run

Build

  • Get the latest version from the git repository.
  • Run mvn clean install to build the project.

Run

1. Using IntelliJ

Start the Server using " Run Server.main() " command, selected from the dialog after right click on:

  • Main Application class: com.server.Server

2. Using CLI

To run the application from command line do following steps

  • open cmd window
  • change directory to the root of your microservice project
  • run mvn clean install to create a jar-file of your microservice.
  • call java -jar essentialprogramming-api/target/uber-essentialprogramming-api-1.0.0-SNAPSHOT from the console

Visit localhost:8080/apidoc to see the endpoints.


πŸŒ€ DB Migration

  • Change directory to 'db-migration'
  • Run mvn compile flyway:baseline; mvn compile flyway:migrate;

πŸŒ€ Developer Setup

Enable lombok

😎 Usefull commands

`mvn dependency:tree`

`mvn dependency:tree -Dincludes=net.minidev:json-smart` //Filter the dependency tree

 [depgraph-maven-plugin](https://github.com/ferstl/depgraph-maven-plugin) :
`mvn com.github.ferstl:depgraph-maven-plugin:3.3.0:graph -DrepeatTransitiveDependenciesInTextGraph -DshowVersions -DgraphFormat=text -DshowGroupIds -DshowConflicts -DshowDuplicates`

πŸŽ“ Learning Resources JPA (Hibernate)

πŸ“ƒ Data versioning

πŸ”© Utilities

πŸ”© Git cleanup commands(Nothing needs to be replaced in these commands)

  • git update-ref -d refs/original/refs/remotes/origin/master
  • git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin
  • git reflog expire --expire=now --all
  • git gc --aggressive --prune=now

πŸ”© Deployment

πŸ” Back to Top

microservice-reference-project's People

Contributors

adrianazdrob avatar catalinasuilea avatar cioleaflorin avatar essentialprogramming avatar markosk29 avatar razvanpaulp avatar

Stargazers

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