This pull request introduces the CountryController class in the com.fleencorp.feen.controller package to provide necessary endpoints for country-related data. The new routes enable access to various country services, enhancing the application's API for user sign-up and country management functionalities.
Changes Made
Created CountryController:
Added the CountryController class under the com.fleencorp.feen.controller package with the base path /api/country.
Implemented Route Methods:
Added route methods corresponding to CountryService functionalities:
/data-for-sign-up:
Method: @GetMapping(value = "/data-for-sign-up")
Utilizes @Cacheable(value = "data-required-to-sign-up") to cache the response.
Calls authenticationService.getDataForSignUp() to retrieve necessary data for user sign-up.
Other Methods:
Added routes for getCountry(), findCountries(), and countAll() as per the CountryService.
Route Path Details:
Ensured that URL paths are simple and descriptive, using straightforward naming conventions like /count-all to keep the API user-friendly.
Notes
This implementation follows the latest changes fetched from the repository using git pull and is developed under the feature/fleenfeen-18 branch.
Commit messages are detailed and descriptive to provide clear context on the changes made.
Testing and Validation
Verify that the new endpoints in CountryController work as expected and provide the necessary responses.
Confirm that the caching mechanism is functioning correctly for the /data-for-sign-up route.
Validate the integration of CountryService methods with the new routes.
Related Issue
Issue: Add CountryController with Route Methods for Country Services
Additional Notes
The added routes will improve the API's efficiency by offering a streamlined way to manage country data, which is essential for user sign-up processes.
Summary
This pull request introduces the
CountryController
class in thecom.fleencorp.feen.controller
package to provide necessary endpoints for country-related data. The new routes enable access to various country services, enhancing the application's API for user sign-up and country management functionalities.Changes Made
Created
CountryController
:CountryController
class under thecom.fleencorp.feen.controller
package with the base path/api/country
.Implemented Route Methods:
CountryService
functionalities:/data-for-sign-up
:@GetMapping(value = "/data-for-sign-up")
@Cacheable(value = "data-required-to-sign-up")
to cache the response.authenticationService.getDataForSignUp()
to retrieve necessary data for user sign-up.getCountry()
,findCountries()
, andcountAll()
as per theCountryService
.Route Path Details:
/count-all
to keep the API user-friendly.Notes
git pull
and is developed under thefeature/fleenfeen-18
branch.Testing and Validation
CountryController
work as expected and provide the necessary responses./data-for-sign-up
route.CountryService
methods with the new routes.Related Issue
CountryController
with Route Methods for Country ServicesAdditional Notes