Skip to content

This Spring Boot application provides a REST API for managing camera onboarding. It uses PostgreSQL for data storage, Azure Blob Storage for image handling, and includes Swagger documentation for API interaction.

Notifications You must be signed in to change notification settings

SelahattinSert/spring-boot-sample-rest-api

Repository files navigation

Camera Onboarding REST API

Description

Spring Boot which project provides a REST API to handle the camera on-boarding process for a surveillance system inside a fridge

Requirements

Java Dependency: 21 Maven

Technologies Used

  • Spring Boot
  • Maven
  • JUnit 5
  • Mockito
  • Log4j2
  • PostgreSQL
  • Liquibase
  • Azure Blob Storage

Installation Instructions

clone the project:

git clone https://github.com/SelahattinSert/demo.git
cd demo

build the project with maven:

mvn clean install

run the project with maven:

mvn spring-boot:run

Database Configuration

Install PostgreSQL from https://www.postgresql.org/download/

create a new database named CameraDB:

createdb CameraDB

Ensure your 'application.properties' file is configured

Ensure you have the necessary dependencies in 'pom.xml' file

Ensure you have the 'changelog-master.xml' file in the 'src/main/resources/db/changelog/' directory with Liquibase changesets

Azure Blob Storage Configuration

This project integrates with Azure Blob Storage for handling image uploads related to the camera onboarding process

Prerequisites:

  1. You need an Azure account. If you don't have one, create it at Azure
  2. Set up an Azure Storage Account and create a Blob Container. For more information, Azure Blob Storage documentation

Azure Blob Storage Setup

  1. Create a Storage Account in the Azure Portal or via Azure CLI:
    az storage account create --name <your-storage-account-name> --resource-group <your-resource-group> --location <your-location> --sku Standard_LRS
    
  2. Create a Blob Container inside the Storage Account:
    az storage container create --name <your-container-name> --account-name <your-storage-account-name>
    
  3. Configure the following properties in your application.properties file:
    azure.storage.account-name=<your-storage-account-name>
    azure.storage.container-name=<your-container-name>
    azure.storage.connection-string=<your-storage-connection-string>
    

Ensure that related dependencies are added to your pom.xml file

API Documentation

The Swagger API documentation for the Camera Onboarding project can be accessed at:

Local Environment: http://localhost:8080/swagger-ui.html

About

This Spring Boot application provides a REST API for managing camera onboarding. It uses PostgreSQL for data storage, Azure Blob Storage for image handling, and includes Swagger documentation for API interaction.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published