GithubHelp home page GithubHelp logo

dw-spring's Introduction

A Demo of Dropwizard/Spring Integration

Why would you want to integrate Dropwizard and Spring?

  • I recommend using Spring Boot. This is for just in case you do not have that option, and you still want to integrate Spring framework into your Dropwizard project.
  • JavaConfig makes the integration much simpler.
  • One good thing of this integration is that there is only one configuration file.

Tech Stack

  • Dropwizard (and then all the libraries that it brings)
  • Spring
  • jose4j (JWT authentication)
  • Swagger UI (REST API Test Console. It is powerful, but its UI design is kind of ugly from a modern point of view ..)

How to run it?

  • Run the command: mvn clean package
  • Run another command: java -jar target/dw-spring-0.0.1-SNAPSHOT.jar server conf/dw.yml
  • Open following URL in a browser: http://localhost:7072/dw/
  • Expand the echo section, and then verify that you can access the echo endpoint without a correct api key
  • Expand the upperEcho section, and then verify that you cannot access the upperEcho endpoint without a correct api key
  • Enter 'c001' as the api key in the upper-right text field, and then verify that you can access the upperEcho endpoint now

Notes

  • I am thinking of implement an OpenID Connect server (using MITREid Connect maybe :)

dw-spring's People

Contributors

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