View on GitHub

car_website_backend

Develop a backend for Car sales company. This can be generalized to any product selling backend. Develop REST and GraphQL APIs, also focuses on how to secure, consume, document, and test those APIs and web services. The API documentation is developed using Swagger.

Pricing Service

The Pricing Service is a micro-service that simulates a backend that would store and retrieve the price of a vehicle given a vehicle id as input.

Details

Packages and classes

spring.application.name=pricing-service
server.port=8082
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/
eureka.client.service-url.default-zone=http://localhost:8761/eureka/
eureka.instance.prefer-ip-address=false

#To map to custom URL
spring.data.rest.basePath=/services

The last line the properties defines custom URL for pricing-service.

Once the application is running, you can check on : http://localhost:8082/services/price

Run the application

To run this service you execute:

$ mvn clean package
$ java -jar target/pricing-service-0.0.1-SNAPSHOT.jar

It can also be imported in your IDE as a Maven project.