Giter Club home page Giter Club logo

spring-microservice-boilerplate's Introduction

spring-microservices-boilerplate

中文版

Index

spring-microservices-boilerplate is a boilerplate which is very helpful for java programmer and friendly to front end.

And build with:

And use specification-arg-resolver for filter.

NOTE If you need RSA sign check, you can use validateWithSignCheck of ValidateHelper

Build and Run [TOP]

$ cd <spring-microservices-boilerplate root path>
$ ./gradlew clean build bootRun

NOTICE [TOP]

  • Validate failed -> Response http status is 422(Unprocessable Entity)
  • Server error -> Response http status is 500(Internal Server Error)

Usage [TOP]

Step 1: Import the init.sql to your database, I suggest you to use PostgreSQL [TOP]

Step 2: Config your application.yml to choose cache type and token store type. [TOP]

Step 3: Access resources with Swagger. [TOP]

Run it, Open your browser and access http://localhost:8080/swagger-ui.html#/.

NOTE Default port is 8080, you can modify it which key is server.port in application.yml.

You can test API by the tips.

  1. Get access_token and refresh_token with login API. and result is:

You'll get a 429 response when you add a "Limit-Key" header value like "root" and request the api too often.
(3 times in 10 seconds, you can config it in application.yml).

Request with "Limit-Key" header: and result is:

  1. Or get new access_token with refresh_token.

  2. Access users. and result is:

Deploy [TOP]

  1. Build war and use tomcat.
  2. Build jar and run java -jar foo.jar
  3. Use Docker. You can build your docker image by Dockerfile. And run it with docker-compose.yml.

License [TOP]

MIT

Copyright (c) since 2015 saintdan

Version History [TOP]

Version history is here. ;)

spring-microservice-boilerplate's People

Contributors

danielliao11 avatar

Watchers

James Cloos 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.