No description, website, or topics provided.
Switch branches/tags
Nothing to show
Latest commit adfb9c6 Jan 18, 2017 Gruczel Gruczel fix gradlew wrapper
Failed to load latest commit information.
deploy docker Mar 28, 2016
gradle/wrapper fix gradlew wrapper Jan 18, 2017
src/main/java/de/mgr/example first version Mar 25, 2016
.gitignore add gradle wrapper jar Jan 18, 2017
.travis.yml jdk8 Jan 18, 2017 fix gradlew wrapper Jan 18, 2017
build.gradle docker Mar 28, 2016
gradlew fix gradlew wrapper Jan 18, 2017
gradlew.bat fix gradlew wrapper Jan 18, 2017
manifest.yml docker Mar 28, 2016


travis status

Source code reference for Java Magazine Article (coming soon)

fake rest service on base of:

  • spring boot
  • swagger
  • oAuth2 + JWT
  • docker

important commands

$ ./gradlew bootRun
$ ./gradlew buildDocker
$ docker run -p 8080:8080 -t michael/spring-boot-app-service-example

use the api:

curl -X POST -H "Content-Type: application/json" http://localhost:8080/register -d 
       "mail": "", 
       "password": "x", 
       "lastName": "x", 
       "name": "y", 
       "firstName": "x", 
       "address": "x"
curl -vu aClient:aSecret -X POST 'http://localhost:8080/oauth/token?'

this should return something like

{ "access_token":"eyJhbGci...YBPFpao",
   "scope":"read write",

which you can use to retrieve data by

curl -i -H "Authorization: Bearer eyJhbGci...YBPFpao" http://localhost:8080/user    

of course using the swagger api is easier http://localhost:8080/swagger-ui.html