Skip to content

This repository contains a simple microservice example in Java built during a live in my Youtube Channel

Notifications You must be signed in to change notification settings

Fernanda-Kipper/microservice-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Microservice

Java Spring Licence

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.

Table of Contents

Installation

  1. Clone the repository:
git clone https://github.com/Fernanda-Kipper/microservice-java.git
  1. Install dependencies with Maven

  2. Clone the Email Microservice repository and follow his installation process

git clone https://github.com/Fernanda-Kipper/desafio-backend-uber.git
  1. Adjust Email Microservice application.properties to run on port 8090
server.port=8090
  1. 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

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"
}

Database

The project utilizes H2 Database 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, and submit your changes in a separate branch.

About

This repository contains a simple microservice example in Java built during a live in my Youtube Channel

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages