Contract testing with Spring Cloud Contract (Part 2)

In the last part, I have briefly introduced the concept of contract testing and why we need it. This article will look into how we can use the Spring Cloud Contract to enforce contract testing between Spring-boot microservice apps.

If you want to quickly dive into the code, feel free to check out the example source code in Github:

In this example, we will implement two services: producer (where the API is implemented) and consumer (where the API is…