- This Spring Boot application showcases the integration of Spring Data JPA Specifications for dynamic and fine-grained querying of employee records.
- The implemented features include processes such as listing, filtering, and retrieving employee records based on various criteria using specifications.
- Specifications are employed to construct flexible queries, enabling the application to efficiently retrieve specific sets of employees based on dynamic conditions.
Method | Url | Description | Request Body | |
---|---|---|---|---|
GET | /api/v1/employees/getEmployees | Get Employees | ListEmployeeRequest | Info |
GET | /api/v1/employees/getEmployees | Get Employees By FirstName | ListEmployeeRequest | Info |
GET | /api/v1/employees/getEmployees | Get Employees By Keyword | ListEmployeeRequest | Info |
GET | /api/v1/employees/getEmployees | Get Employees By Department Name | ListEmployeeRequest | Info |
GET | /api/v1/employees/getEmployees | Get Employees By Birthday At | ListEmployeeRequest | Info |
GET | /api/v1/employees/getEmployees | Get Employees By Birthday After | ListEmployeeRequest | Info |
GET | /api/v1/employees/getEmployees | Get Employees By Birthday Before | ListEmployeeRequest | Info |
GET | /api/v1/employees/getEmployees | Get Employees By Birthday Between | ListEmployeeRequest | Info |
http://localhost:8080/api/v1/employees/getEmployees
{
"filter":{}
}
http://localhost:8080/api/v1/employees/getEmployees
{
"filter":{
"firstName":"Stormy"
}
}
http://localhost:8080/api/v1/employees/getEmployees
{
"filter": {
"keyword": "Mitchell"
}
}
http://localhost:8080/api/v1/employees/getEmployees
{
"filter": {
"firstName": "Domonique",
"departmentName": "Public Safety"
}
}
http://localhost:8080/api/v1/employees/getEmployees
{
"filter": {
"birthdayDate": {
"birthdayDateFirst": "1984-10-04",
"dateComparison": "AT"
}
}
}
http://localhost:8080/api/v1/employees/getEmployees
{
"filter": {
"birthdayDate": {
"birthdayDateFirst": "1994-01-13",
"dateComparison": "AFTER"
}
}
}
http://localhost:8080/api/v1/employees/getEmployees
{
"filter": {
"birthdayDate": {
"birthdayDateFirst": "1994-01-13",
"dateComparison": "BEFORE"
}
}
}
http://localhost:8080/api/v1/employees/getEmployees
{
"filter": {
"birthdayDate": {
"birthdayDateFirst": "1981-07-28",
"birthdayDateSecond": "1982-07-20",
"dateComparison": "BETWEEN"
}
}
}
- Java 17
- Spring Boot 3.0
- Restful API
- Lombok
- Maven
- Postman
- Faker
- Spring Boot Devtools
To build and run the application with Maven
, please follow the directions shown below;
$ cd jpaspecification
$ mvn clean install
$ mvn spring-boot:run