/spring-cloud-subservice

Subservice used to make communication with spring-cloud-setup app and perform basic contract testing.

Primary LanguageJava

Spring-cloud-subservice

This service is used to co-work with Spring-cloud-setup it enables endpoint with cars.json on "/" path.

How-to

Get cars list

To access list of cars send request to "ip:server.port/" server.port is available in application.properties in resources folder.

Generate contract tests stub

Contract tests are generated after triggering gradle build but to make it available in m2 memory You need to push created stubs to Maven local it is easier to access stubs that way (default in memory access is based on maven) more examples about this behaviour is present in Spring contract testing co-creator repository https://github.com/spring-cloud-samples/spring-cloud-contract-samples/blob/main/producer_with_junit4/build.gradle

Add service to kubernetes

To create deployment and service You can use spring-deployment/service.yaml with command "kubectl apply (-f FILENAME | -k DIRECTORY)" If You want deployment to work remember to use proper name whe creating and pushing app docker build.