This project is an API built using Java, Java Spring, H2 as the database.
The API was developed for my Youtube Channel, to demonstrate how to create and integrate microservices using Java Spring.
- Clone the repository:
git clone https://github.com/Fernanda-Kipper/microservice-java.git
-
Install dependencies with Maven
-
Clone the Email Microservice repository and follow his installation process
git clone https://github.com/Fernanda-Kipper/desafio-backend-uber.git
- Adjust Email Microservice application.properties to run on port
8090
server.port=8090
- Run both Microservices
- Start the application with Maven
- The API will be accessible at http://localhost:8080
The API provides the following endpoints:
GET EVENTS
GET /events - Retrieve a list of all events.
[
{
"id": "ae413540-515d-4add-8cd1-1702c7d280d7",
"maxParticipants": 20,
"registeredParticipants": 0,
"date": "28/11/2023",
"title": "Frontin Floripa",
"description": "Evento Tech em Floripa!!"
}
]
GET UPCOMING EVENTS
GET /events/upcoming - List all upcoming events (which the date is greather then current date).
[
{
"id": "ae413540-515d-4add-8cd1-1702c7d280d7",
"maxParticipants": 20,
"registeredParticipants": 0,
"date": "28/11/2023",
"title": "Frontin Floripa",
"description": "Evento Tech em Floripa!!"
}
]
POST EVENT
POST /events - Register a new event into the App
{
"maxParticipants": 20,
"registeredParticipants": 0,
"date": "28/11/2023",
"title": "Frontin Floripa",
"description": "Evento Tech em Floripa!!"
}
POST REGISTRATION
POST /events/${id} - Register a user into a Event if event is not full
{
"participantEmail": "liveskipperdev@gmail.com"
}
The project utilizes H2 Database as the database.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request to the repository.
When contributing to this project, please follow the existing code style, commit conventions, and submit your changes in a separate branch.