Build chain from UserController - UserService - UserRepository with request getUsers.
1.Create UserController, request ("/user"), http method = GET. (please, take the template at AdminController
2.Create tests as minimum:
-
at SecureIntegrationTest.
Every request except login of admin passes security check. So for all these request you should generate JWS token for User with this method and put it to the header of request.
You have to check if security works - positive and negative cases. (look at the examples in the tests of admin authentication);
-
at UserServiceImpl check getUsers() from service to DB.
Build chain from UserController - UserService - UserRepository with request getUsers.
1.Create UserController, request ("/user"), http method = GET. (please, take the template at AdminController
2.Create tests as minimum:
at SecureIntegrationTest.
Every request except login of admin passes security check. So for all these request you should generate JWS token for User with this method and put it to the header of request.
You have to check if security works - positive and negative cases. (look at the examples in the tests of admin authentication);
at UserServiceImpl check getUsers() from service to DB.