Files
getting-started/core-java/retrofit/introduction-to-retrofit/SimpleLibraryApplication
ranjanih 2185f9c68d Introduction to retrofit (#185)
* Initial 3rd party library application

* Add basic auth to app and swagger-ui

* Modifications

* Audit application Initial commit

* Update README

* Application header changes

* Caching

* sync async requests

* Additional changes

* Unit tests

* Updates

* Mistaken refactoring

* Mistaken refactoring

* Mock updates

* Test updates

* Updates

Co-authored-by: ranjani2412 <53815317+ranjani2412@users.noreply.github.com>
2022-05-18 06:27:51 +10:00
..
2022-05-18 06:27:51 +10:00
2022-05-18 06:27:51 +10:00
2022-05-18 06:27:51 +10:00
2022-05-18 06:27:51 +10:00
2022-05-18 06:27:51 +10:00
2022-05-18 06:27:51 +10:00
2022-05-18 06:27:51 +10:00

A simple Spring Boot & Springfox library application

This application manages a database of books and authors

Details

  • This application uses the default demo HSQLDB schema to maintain book and authors.
  • It uses Spring Boot to create REST endpoints
  • For the endpoint documentation it uses Swagger2
  • It uses Maven and Java11 to build and run.

How to run

  • Clone this project
  • Use maven command: mvn clean verify spring-boot:run
  • The application should run at http://localhost:8090
  • The swagger documentation will be available at http://localhost:8090/swagger-ui.html#/
  • Uses Basic auth for authentication.

Sample request JSON body

POST Sample

{
"bookName": "The Da Vinci Code",
"publisher": "Corgie Adult",
"publicationYear": "2009",
"isCopyrighted": true,
"authors": [{
"name": "Dan Brown",
"dob" : "22/06/1964"
}]
}

PUT Sample

{
    "bookName": "The Da Vinci Code",
    "publisher": "Corgie Adult - 01",
    "publicationYear": "2010"
}