- Application is not secured.
- In the case of complaint creation and nationality fetching failure I return 5xx. There are many other
better solutions, but it depends on business requirements:
- Retry call (resilience4j, spring-retry, manually in code)
- Other configuration with retries and acceptable timeout.
- Save the complaint without nationality and then fetch asynchronously (queue, async task etc.).
- I have assumed that there are a large number of complaints, and that they should be returned using paging.
- I save instant date without offset.
- IP is passed in 'X-Forwarded-For' header, more details in: com.example.task.controller.ComplaintController.
- I've chosen https://ip-api.com/docs/api:json as free IP API service .
- There aren't true integration tests because I use a mock mvc and mock some dependencies like a 'clock'.
- I added db asserts in tests to indicate that I met requirements. There are different approaches to test applications and one is to test only via API (true integration tests) but I decided to show that everything is correctly saved in db.
- In tests instead of invoking target REST service I would add the wiremock and mock http calls.
-
Notifications
You must be signed in to change notification settings - Fork 0
lukasz-bigorajski/task
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published