Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bookstore Sprint (Final Java) :( #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

simonesquad
Copy link

  • Currently, Books are not addressed in security so those routes cannot be accessed. Setup security so that the following access is available:

GET /books/books - any user with the role ADMIN or DATA can access
GET /books/book/{id} - any user with role ADMIN or DATA can access
POST /books/book - any user with role ADMIN can access
PUT /books/book/{id} - any user with role ADMIN can access
DELETE /books/book/{id} - any user with role ADMIN can access
When a client tries searching for or updating a book that does not exist, a generic exception is sent back to the client. Change this so our custom exception ResourceNotFoundException is returned instead.

  • Add unit test for the Book Service using the database as test data. The structure is already in place, you just need to write the tests for the following:

findAll
findBookById that succeeds
findBookById that fails
delete
save a new book
Add unit tests for the Book Controller NOT relying on the database as test data. The structure is already in place, you need to set up the data and write the tests for the following:

listAllBooks
getBookById that succeeds
getBookById that fails
addNewBook
deleteBookById

  • And now that we have a good system, deploy the system to Heroku using PostgreSQL. Your application should be switchable between H2 and PostgreSQL through setting a variable in application.properties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant