Defining contracts and generating stubs

As I have already mentioned in contrast to Pact, in Spring Cloud Contract, the provider (server side) is responsible for publishing the contract specification. Therefore, we will begin the implementation from account-service, which serves the endpoint invoked by customer-service. But before proceeding to the implementation, take a look at the following diagram. It illustrates the main components taking part in our testing process. The source code of the sample application is available in the same GitHub repository as the previous samples, but on a different branch contract:

To enable Spring Cloud Contract ...

Get Mastering Spring Cloud now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.