This project is a REST API built using Spring Boot. The API provides endpoints for managing and performing CRUD (Create, Read, Update, Delete) operations.
- RESTful endpoints for resource management
- CRUD operations
- Exception handling
- Input validation
- Java 11 or higher
- Maven
-
Clone the repository:
git clone https://github.com/infernus01/REST_API_BeginnerSpring.git cd REST_API_BeginnerSpring
-
Build the project:
mvn clean install
-
Run the application:
java -jar target/your-app-name.jar
Or,
mvn spring-boot:run
GET /employees
- Retrieve allGET /employees/{id}
- Retrieve a resource by IDPOST /employees
- Create a new resourceDELETE /employees/{id}
- Delete a resource
-
GET request to retrieve one or all:
curl -X GET http://localhost:8080/employees curl -X GET http://localhost:8080/employees/{id}
-
POST request to create a new resource:
curl -X POST -H "Content-Type: application/json" -d '{"name": "New Resource"}' http://localhost:8080/employees
- Fork the repository
- Create a new branch (
git checkout -b feature/YourFeature
) - Make your changes
- Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature/YourFeature
) - Open a Pull Request