This service is a REST API that returns customer information.
A customer is a tuple of (id, username, name, surname, address, zipCode, city, country).
All responses are in JSON format.
There are 2 endpoints:
/customers
returns a list of all the customers (upto pagination limit)/customers/{id}
returns the info of the customer with that id.
$ SPRING_PROFILES_ACTIVE=local ./mvnw clean spring-boot:run -P local
Browse to http://localhost:8080/customers
$ docker run --rm -it \
-p 8080:8080 \
-e SPRING_PROFILES_ACTIVE=dev-inmemorydb \
-v "$PWD/target/ROOT.war:/usr/local/tomcat/webapps-javaee/ROOT.war" \
tomcat
- Login to your Cloud Foundry account (
cf login
orcf login --sso
) if you haven't done so already. - If you haven't set an
$appname
yet, then choose an appropriate name that doesn't clash with apps that have already been deployed to Cloud Foundry. Example:We will use this same$ appname='my-new-enterprise-app'
$appname
when deploying all the other services. - Run the below commands to deploy the
customers
service to Cloud Foundry.$ SPRING_PROFILES_ACTIVE=dev-inmemorydb ./mvnw clean package -P dev-inmemorydb $ cf push "$appname"-customers