Welcome to the Real-Time REST APIs project built with Spring Boot! This project is a comprehensive implementation based on the Udemy course "Building Real-Time REST APIs with Spring Boot".
- Introduction
- Features
- Technologies Used
- Prerequisites
- Installation
- Running the Application
- Usage
- Contributing
- License
This project demonstrates how to build real-time RESTful APIs using Spring Boot. It covers essential concepts and best practices for developing scalable and maintainable web services.
- CRUD operations for managing entities
- Exception handling
- Validation
- Pagination and sorting
- Security with JWT
- Real-time updates with WebSockets
- Unit and integration testing
- Java
- Spring Boot
- Spring Data JPA
- Spring Security
- JWT (JSON Web Token)
- WebSockets
- MySQL (or any other preferred database)
- Maven
Before you begin, ensure you have the following installed:
- JDK 21 or higher
- Maven
- MySQL (or another database)
- An IDE (IntelliJ IDEA, Eclipse, etc.)
-
Clone the repository:
git clone https://github.com/yourusername/real-time-rest-apis.git cd real-time-rest-apis
-
Configure the database:
Update the
application.properties
file with your database configuration:spring.datasource.url=jdbc:mysql://localhost:3306/yourdatabase spring.datasource.username=yourusername spring.datasource.password=yourpassword spring.jpa.hibernate.ddl-auto=update
-
Install dependencies:
mvn clean install
-
Start the application:
mvn spring-boot:run
-
The application will be accessible at
http://localhost:8080
.
- API Documentation: Visit
http://localhost:8080/swagger-ui.html
for the API documentation and testing. - Real-Time Updates: Connect to the WebSocket endpoint at
ws://localhost:8080/your-websocket-endpoint
.
- Get all items:
GET /api/items
- Create a new item:
POST /api/items
- Update an item:
PUT /api/items/{id}
- Delete an item:
DELETE /api/items/{id}
Refer to the API documentation for a complete list of endpoints and their usage.
Contributions are welcome! Please fork the repository and create a pull request with your changes. Make sure to update tests as appropriate.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.