spring-boot-starter-security and org.springframework.security:spring-security-test as Maven dependencies.
password property to the customer entity and a corresponding column to the customer table of the database schema.
EMPLOYEE and customers with their email address as username, their passwords and the role CUSTOMER.
| Service | Function | Authentication required | Grant access to role | ||
|---|---|---|---|---|---|
| CUSTOMER | EMPLOYEE | ||||
| Customer | Register customer Find customer Search customers Update customer |
no yes yes yes |
yes no yes |
yes yes yes |
|
| Order | Place order Find order Search orders Cancel order |
yes yes yes yes |
yes yes yes yes |
no yes yes yes |
|