Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fernanda-kipper/microservice-java
This repository contains a simple microservice example in Java built during a live in my Youtube Channel
https://github.com/fernanda-kipper/microservice-java
feign feign-client java java-spring microservice
Last synced: 24 days ago
JSON representation
This repository contains a simple microservice example in Java built during a live in my Youtube Channel
- Host: GitHub
- URL: https://github.com/fernanda-kipper/microservice-java
- Owner: Fernanda-Kipper
- Created: 2023-12-15T14:16:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-17T14:40:09.000Z (about 1 year ago)
- Last Synced: 2024-11-13T07:09:47.092Z (3 months ago)
- Topics: feign, feign-client, java, java-spring, microservice
- Language: Java
- Homepage: https://youtube.com/live/yACzWg9gUGM
- Size: 67.4 KB
- Stars: 19
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Event Microservice
![Java](https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white)
![Spring](https://img.shields.io/badge/spring-%236DB33F.svg?style=for-the-badge&logo=spring&logoColor=white)
[![Licence](https://img.shields.io/github/license/Ileriayo/markdown-badges?style=for-the-badge)](./LICENSE)This project is an API built using **Java, Java Spring, H2 as the database.**
The API was developed for my [Youtube Channel](https://www.youtube.com/live/yACzWg9gUGM?si=lYfhFaalzE56tkC_), to demonstrate how to create and integrate microservices using Java Spring.
## Table of Contents
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [API Endpoints](#api-endpoints)
- [Database](#database)
- [Contributing](#contributing)## Installation
1. Clone the repository:
```bash
git clone https://github.com/Fernanda-Kipper/microservice-java.git
```2. Install dependencies with Maven
3. Clone the [Email Microservice](https://github.com/Fernanda-Kipper/desafio-backend-uber) repository and follow his installation process
```bash
git clone https://github.com/Fernanda-Kipper/desafio-backend-uber.git
```4. Adjust Email Microservice application.properties to run on port `8090`
```yaml
server.port=8090
```5. Run both Microservices
## Usage
1. Start the application with Maven
2. The API will be accessible at http://localhost:8080## API Endpoints
The API provides the following endpoints:**GET EVENTS**
```markdown
GET /events - Retrieve a list of all events.
```
```json
[
{
"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**
```markdown
GET /events/upcoming - List all upcoming events (which the date is greather then current date).
``````json
[
{
"id": "ae413540-515d-4add-8cd1-1702c7d280d7",
"maxParticipants": 20,
"registeredParticipants": 0,
"date": "28/11/2023",
"title": "Frontin Floripa",
"description": "Evento Tech em Floripa!!"
}
]
```**POST EVENT**
```markdown
POST /events - Register a new event into the App
```
```json
{
"maxParticipants": 20,
"registeredParticipants": 0,
"date": "28/11/2023",
"title": "Frontin Floripa",
"description": "Evento Tech em Floripa!!"
}
```**POST REGISTRATION**
```markdown
POST /events/${id} - Register a user into a Event if event is not full
``````json
{
"participantEmail": "[email protected]"
}
```## Database
The project utilizes [H2 Database](https://www.h2database.com/html/tutorial.html) as the database.## Contributing
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](https://www.conventionalcommits.org/en/v1.0.0/), and submit your changes in a separate branch.