Skip to content

Spring Boot + REST + JPA + JWT(Oauth) + Swagger Docs Integration Demo Application to get started quickly.

Notifications You must be signed in to change notification settings

nj11/springboot-swagger-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo Application using REST,Spring Boot,JPA,OAuth/JWT and Swagger.

Setup Spring Boot Rest App with JAX-RS

Checkout and setup application using maven to generate war and deploy to web server.

mvn clean compile package

Navigate to this page to view generated rest swagger documentation

http(s)://<servername>:<port>/springboot-swagger-demo/swagger-ui.html

Swagger config resides here.

com.springboot.swagger.demo.config.SwaggerConfig

API to query :

URL : http://localhost:8080/springboot-swagger-demo/v1/todo/list

METHOD : GET

Sample Response (JSON)

[
  {
    "id": 0,
    "description": "Description for Todo 1",
    "expectedBeginDate": "2018-12-05",
    "expectedCompletionDate": null,
    "completed": false
  }
]

Screenshots

Step 1 :User signup with Postman

image

Step 2 :User Login with Postman.Copy the token generated on successful login

image

Step 3 :On Swagger UI ( http://localhost:8080/springboot-swagger-demo/swagger-ui.html ) click authorize and paste token from Step 2

image

Step 4:Execute the API.Note the bearer token added in authorization header in generated curl

image

About

Spring Boot + REST + JPA + JWT(Oauth) + Swagger Docs Integration Demo Application to get started quickly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages