Welcome to the Leave App Server repository! This Spring Boot application provides the backend API for managing employee leave requests.
The Leave App Server is the backend application that handles employee leave requests and provides data to the frontend client. It utilizes Spring Boot to create RESTful APIs for submitting and fetching leave details.
Before you begin, ensure you have the following installed:
- Java Development Kit (JDK) 8 or later
- Maven (https://maven.apache.org/)
-
Clone the Repository:
git clone https://github.com/AbhishekMali21/LEAVE-APP-SERVER.git cd leave-app-server
-
Build the Project:
mvn clean install
-
Run the Application:
java -jar target/leave-app-server.jar
The application will start and run on the default port 9090.
-
Access the API:
You can access the API using the base URL
http://localhost:9090/api
. You can access the API documentation using the Swagger URLhttp://localhost:9090/swagger-ui/index.html#/
. -
Submit Leave Requests:
Use the appropriate API endpoint to submit leave requests. The API is designed to handle different types of leave-related operations.
-
Fetch Leave Records:
Use the API endpoints to fetch leave records for specific employees or all employees.
/api/leaves/save
: Submit a new leave request./api/leaves/employee/{empId}
: Fetch leave records for a specific employee./api/leaves/all
: Fetch leave records for all employees.
Refer to the code and Swagger API documentation for more details on request and response structures.
- Java with Spring Boot (https://spring.io/projects/spring-boot)
- Spring Data JPA for database interaction
- Maven for build and dependency management