Welcome to the Spring REST with Spring Boot repository! This repository contains hands-on demos to help you understand and implement RESTful web services using Spring Boot. Whether you're a beginner or an experienced developer, this repository will guide you step by step through essential Spring REST concepts.
- Why REST?
- What is REST?
- Spring MVC vs Spring REST
- First application using Spring REST
- Advanced annotations & ResponseEntity
- Accept input using @RequestBody
- Accept input using @PathVariable
- Accept input using @RequestParam
- Accept input using @MatrixVariable
- Exception Handling
- Input validation
- Pagination
- Replace JSON with XML
- Actuators
- API Versioning
- REST Template
- REST Client
- CORS
- HATEOAS
- SpringDoc
- Internationalization & Localization
- Spring Boot Admin
- Unit Testing
- Cucumber Testing
These demos have been built using JDK 21, Spring Framework 6, and Spring Boot 3. While it is recommended to have JDK 21 installed, the examples can be adapted to other Java versions with minimal modifications.
The database used in these examples is MySQL, but the code can be adjusted to work with other databases if needed.
Before diving into Spring REST, ensure you're comfortable with the following concepts:
- Java Basics
- Java Advanced
- Java Database Connectivity (JDBC)
- Maven
- Hibernate
- Spring Basics with Spring Boot
- Spring Data JPA with Spring Boot
Follow these steps to set up and execute the demos:
- Clone the repository.
- Import the project into your preferred IDE as a Maven Project.
- Configure the database connection, if necessary.
- Run the application and test the endpoints.
If you're a beginner, it's best to execute the demos in the given order to build your understanding progressively. If you're experienced, feel free to explore specific demos based on your needs.
These demos are explained in detail on my YouTube channel Abhishek Verma. Watch the complete playlist here: Spring REST with Spring Boot.
🚀 Stay healthy, keep learning, and keep growing!