This is servlet application
- Make it restful
- Error resistance
- Maybe change to webflux
- Write Tests
- Task: Write a complex SQL query to generate a report, such as a list of the most popular books by genre. Include
database indexing to optimize the query
- Most borrowed book
- Average time of borrow
- Book not returned
- Finish create controller, with duplicate/ without author/ with author
- Mark ISBN as unique
- Prevent creation of books that overrides a previous book. Maybe introduce different endpoints
- Investigate why searching by name is not working
- Spring Authentication
- Only Admin can create books and authors
- Role base access
- Mark creation of books as transactional
- Users can borrow/return books
- Users must borrow only 1 book. They have to return the book before borrowing a new one
- Pagination
- User -> Book relationship
- Servlet vs Web-flux?
- Track how all this security is working with debugging
Don't forget to uncomment the following section in pom.xml
<jvmArguments>
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
</jvmArguments>
The project won't start until you attach a debugger to it
curl -iX POST \
-H "Content-Type: application/json" \
-d '{"username": "mark", "password": "password", "name":"mark"}' \
http://localhost:8080/auth/register
curl -X POST \
-H "Content-Type: application/json" \
-d '{"username": "mark", "password": "password"}' \
http://localhost:8080/auth/login
curl --location 'localhost:8080/book/all' \
--header 'Authorization: Bearer <token>'
curl -iX POST\
-H "Content-Type: application/json" \
-d '{"name": "Joan Kathlin Rowlings"}'\
http://localhost:8080/author/create