- write a Spring Boot application with the necessary dependencies that:
- works with an entity
Month
that has the following attributes:- an int
monthNumber
- an
englishName
- an
italianName
- a
germanName
- an int
- has 2 controllers:
BasicController
that:- welcomes the user on the root mapping
MonthController
that:- is mapped on
months
- returns a
Month
using a specific request attribute
- is mapped on
- has an interceptor/middleware called
MonthInterceptor
that:- has a list of 6
Month
s - takes the header
monthNumber
from the request - if
monthNumber
is null/empty then returns an HTTPBad Request
error - else:
- looks if the passed
monthNumber
is present in the list- if present, returns it using a specific request attribute
- else, returns an empty
Month
with all the string values set tonope
- returns an HTTP
OK
status
- looks if the passed
- has a list of 6
- works with an entity
- test the endpoint call using
Postman
and considering at least 4 cases:- the header
monthNumber
is absent - the header
monthNumber
is empty - the header
monthNumber
has a value that is in the list - the header
monthNumber
has a value that is not in the list
- the header
- for reviewers:
Postman
's API calls collection is inInterceptors-2.postman_collection.json
-
Notifications
You must be signed in to change notification settings - Fork 0
fconsiglio98/interceptors-middleware-2
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description or website provided.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published