This Spring Boot microservice provides information about gas stations, including fuel prices and location data.
- Java 17 or later
- Spring Boot
- Local database MYSQL
- Restful service
- Clone this repository:
git clone https://github.com/lamenco/B812i2DC4-5aV1-9RdaA-vE41-pi4sVY7DYx1F
- Navigate to the project directory:
cd gas-station-microservice
- Create a local database (MySQL) and configure the connection settings in
application.properties
.
The application will start and listen on http://localhost:8080.
- GET
/diesel-highest-price
- Get gas station with the highest diesel price. - GET
/e5-highest-price
- Get gas station with the highest E5 price. - GET
/e10-highest-price
- Get gas station with the highest E10 price. - GET
/diesel-lowest-price
- Get gas station with the lowest diesel price. - GET
/e5-lowest-price
- Get gas station with the lowest E5 price. - GET
/e10-lowest-price
- Get gas station with the lowest E10 price. - GET
/DieselMiddlePrice
- Get the average price for diesel. - GET
/E5MiddlePrice
- Get the average price for E5 fuel. - GET
/E10MiddlePrice
- Get the average price for E10 fuel. - GET
/searchByName?name={stationName}
- Search gas stations by name.
You can access the different endpoints using a web browser or API testing tools like Postman.