Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ravening/bookrentalsystem
Web application to manage the book renting system
https://github.com/ravening/bookrentalsystem
goodreads-api google-books-api jackson java-8 jaxb maven mongodb restful-webservices spring-boot-2
Last synced: 22 days ago
JSON representation
Web application to manage the book renting system
- Host: GitHub
- URL: https://github.com/ravening/bookrentalsystem
- Owner: ravening
- Created: 2019-05-20T13:39:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-26T16:17:42.000Z (2 months ago)
- Last Synced: 2024-10-04T15:31:15.713Z (about 1 month ago)
- Topics: goodreads-api, google-books-api, jackson, java-8, jaxb, maven, mongodb, restful-webservices, spring-boot-2
- Language: Java
- Size: 84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a web application to manage the book rental system
where people can rent out their own books or rent books from
other people.Prerequisites to run the project
Java, maven, mongodb, Intellij/Eclipse
Steps to run the project
1. Checkout the repository to your local directory
2. Make sure that mongodb is installed in your system and is up and running
3. If security is enabled to login to mongodb, then enter those credentials in src/main/resources/application.properties file
4. Uncomment the mongodb.user and other configuration and enter the proper values. Also enter the proper ip address of mongodb host
5. Run the project using "./mvnw spring-boot:run"
6. The application uses JWT for authentication and authorization in the backend.
7. To test the api calls create a dummy user in the database under "user" collection
or you can create new user using below command
curl -H "Content-Type: application/json" -X POST -d '{
"firstname": "",
"lastname": "",
"username": "",
"password": "",
"phone": "",
"enabled": "true"
}' http://localhost:8080/api/v1/user/signup8. Now try to login using the below command
curl -i -H "Content-Type: application/json" -X POST -d '{
"username": "admin",
"password": "password"
}' http://localhost:8080/login9. Now test the data by passing the JWT token to any of the get requests from postman
10. Sample endpoint is /api/v1/books/listall
11. To list all the endpoints navigate to "http://localhost:8080/swagger-ui.html#/books-controller"
For more information related to JWT, refer
https://auth0.com/blog/implementing-jwt-authentication-on-spring-boot/