Project Title

Power Plant System

Overview

This project is built using Java 17 and Spring Boot 3.3.1. It utilizes an in-memory H2 database to provide data storage. The project exposes two RESTful APIs for managing batteries: a POST API for creating batteries and a GET API for retrieving batteries based on a specified postal code range.

API Endpoints

POST /batteries

This endpoint allows the creation of new batteries.

Request

  • Endpoint: http://localhost:8080/batteries
  • Method: POST

GET /batteries

This endpoint retrieves a list of batteries based on a specified postal code range.

Request

  • Endpoint: http://localhost:8080/batteries
  • Method: GET
  • Query Parameter: postCodeRange (e.g., http://localhost:8080/batteries?postCodeRange=0-20000)

Database

The project utilizes an in-memory H2 database for data storage.

Running the Project

you can just use JDK 17 configured Intellij IDEA to run this

Dependencies

  • Java 17
  • Spring Boot 3.3.1
  • H2 in-memory database