This is a Java Spring Boot application that provides APIs to perform CRUD operations on the EV-Stations. It uses Swagger to document the APIs.
- Java 19
- MySQL database
- Spring Boot 3.0.4
-
Clone this repository to your local machine using git clone
https://github.com/Dr-Dreams/EVChargingStationApi.git
-
Navigate to the project directory:
cd EVChargingStationApi
-
Open the project in your IDE(Suggestion : - Intellij IDEA, VS-CODE)
-
Open application.properties
/src/main/resoucres
-
Set up your MySQL database and update the application.properties file with your database details
spring.datasource.url=jdbc:mysql://localhost:3306/DataBaseName spring.datasource.username=user spring.datasource.password=pass
-
Run the application
mvn spring-boot:run
-
The application should now be accessible at
http://localhost:8080/api-docs or http://localhost:8082/swagger-ui/index.html
- GET /api/v1/stations: Get a list of all charging stations.
- GET /api/v1/stations/show/{id}: Get details of a specific charging station by ID.
- POST /api/v1/stations: Create a new charging station with a station image and pricing information.
- PUT /api/v1/stations/{id}/edit: Update an existing charging station by ID.
- DELETE /api/v1/stations/delete/{id}: Delete an existing charging station by ID.
- GET /api/v1/stations?limit=value: Get a list of {value} number of charging stations.
- GET /api/v1/stations?sort={sort}¶m={param}: Get a list of charging stations sorted by a specified parameter and sorting order.
- Spring Boot - The web framework used
- Maven - Dependency Management
- MySQL - Database used
- OpenAPI - API documentation
[stationId, stationName, stationImage, stationPricing, stationAddress]