This is a project that will store the T20 World Cup participating countries, the teams and the players. In this project RESTful services are implemented using Spring Boot. For security, Spring Security and JWT authentication is implemented. PostgreSQL is used as the database.
Spring boot version - 2.7.5 Java Version - jdk17
The Enities are:
- Country
- Team
- Player
- User
The endpoints are:
For Authentication:
- /auth/login ---> to login and get the access token
For Country:
- /api/v1/country/save ---> to save
- /api/v1/country/by-id ---> to get country by id
- /api/v1/country/by-name ---> to get country by name
- /api/v1/country/all ---> to get all countries
- /api/v1/country/update ---> to update a country
- /api/v1/country/delete ---> to delete a country
For Team:
- /api/v1/team/save ---> to save team
- /api/v1/team/by-id ---> to get team by id
- /api/v1/team/by-name ---> to get team by name
- /api/v1/team/by-country ---> to get team by country
- /api/v1/team/all ---> to get all teams
- /api/v1/team/update ---> to update a team
- /api/v1/team/delete ---> to delete a team
For Player:
- /api/v1/player/save ---> to save player
- /api/v1/player/by-id ---> to get player by id
- /api/v1/player/by-name ---> to get player by name
- /api/v1/player/by-team ---> to get player by team
- /api/v1/player/by-country ---> to get player by country
- /api/v1/player/by-score ---> to get player by score
- /api/v1/player/all ---> to get all players
- /api/v1/player/update ---> to update a player
- /api/v1/player/delete ---> to delete a player
For User:
- /api/v1/user/save ---> to save user
- /api/v1/user/by-id ---> to get user by id
- /api/v1/user/by-email ---> to get user by email
- /api/v1/user/all ---> to get all user
- /api/v1/user/update ---> to update a user
- /api/v1/user/delete ---> to delete a user
Only the endpoints "/auth/login" and "/api/v1/user/save" can be used without any access token. The rest other endpoints need access token as "Authorization" header in the following manner.
"Authorization: Bearer >token<"