# Spring Cloud Contract

Archived Spring contract\-testing project with generated provider tests and consumer stubs\.

ID: Q878 · Revision: 926

Type: software · License: Apache\-2\.0[^spring-contract-archive] · Status: discontinued

Website: https://spring.io/projects/spring-cloud-contract



Spring Cloud Contract is the archived Spring project for consumer\- and producer\-driven contract testing of HTTP and message interactions\. Its definitions generate verification tests and reusable stubs; Spring transferred maintenance and ownership to the Stubborn project in July 2026\.[^spring-contract-intro][^spring-contract-archive][^spring-contract-transition]

## Contracts and generated verification

The documented workflow adds Contract Verifier and its build plugin, then defines expected HTTP or messaging interactions in contract files such as Groovy DSL or YAML\. The build generates tests that check whether the application satisfies those definitions\. Generated tests need a suitable base class to configure controllers, messaging infrastructure or other test context; writing the contract does not by itself supply a working application implementation\.[^spring-contract-first]

## Consumer fixtures and incomplete contracts

Generated stubs allow consumers to work against defined behavior\. The runtime\-stub documentation distinguishes normal producer verification from contracts marked in progress: those can produce stubs without generating the corresponding producer tests\. Consumers can also request fresh stub generation from contract definitions\. Such a fixture can unblock development, but its availability should not be treated as evidence that the producer has already passed verification\.[^spring-contract-runtime]

## End of Spring maintenance

Spring announced the ownership and support transfer on July 6, 2026, stating that the project would leave future Spring Cloud release trains and stop receiving Spring maintenance in existing active trains\. The repository was subsequently archived\. Its Apache\-2\.0 code and documentation remain available, but the Spring\-branded project is a legacy dependency rather than an actively maintained new adoption target\.[^spring-contract-transition][^spring-contract-archive]

## Moving to the continuation

The official continuation is [Stubborn Contract](/stubborncontract)\. Its migration documentation preserves YAML contract structure and supports existing generated WireMock stubs, while changing build coordinates, Java package names and configuration prefixes\. Groovy and Kotlin contracts need import updates, and JUnit 4 rule usage must move to JUnit 5 extensions\. This is a documented migration path, not a claim that every build works unchanged merely by replacing a version number\.[^stubborn-migration]

## Substitution scope

For an existing JVM test suite, Spring Cloud Contract can fulfill some of the interface\-verification tasks addressed by [Pact JS](/pactjs), using defined contracts and generated tests instead of JavaScript consumer tests\. The overlap does not imply interchangeable artifacts or equal test coverage\. Given the maintenance transfer, continued use should be assessed as legacy retention; the successor is the more direct migration route for established Spring Cloud Contract assets\.[^spring-contract-first][^spring-contract-transition][^pact-intro][^pact-js-readme]

## Capabilities and substitutions

### Generated provider tests — supported

Contract definitions produce verification tests requiring application\-specific base setup\.[^spring-contract-first]

Use case: Legacy JVM contract verification · Platforms: JVM, Maven, Gradle · Region: Version, plan and platform requirements apply

### In\-progress contract stubs — limited

Stubs can exist before corresponding producer tests are generated or passing\.[^spring-contract-runtime]

Use case: Legacy JVM contract verification · Platforms: JVM, Maven, Gradle · Region: Version, plan and platform requirements apply

### Spring\-maintained updates — unsupported

Spring ended maintenance and transferred the project to Stubborn\.[^spring-contract-transition]

Use case: Legacy JVM contract verification · Platforms: JVM, Maven, Gradle · Region: Version, plan and platform requirements apply

### [Substitute for Pact JS](/pactjs) — limited

Limited legacy JVM alternative for interface verification through defined contracts and generated tests; not interchangeable JavaScript contracts and no ongoing Spring maintenance\.[^spring-contract-transition][^spring-contract-first][^pact-js-readme]

Use case: Legacy JVM contract verification · Platforms: JVM, Maven, Gradle · Region: Version, plan and platform requirements apply

## References

[^spring-contract-archive]: [Spring Cloud Contract archived repository](<https://github.com/spring-attic/spring-cloud-contract>) — Archive notice, maintenance transfer and Apache\-2\.0 (vendor; retrieved 2026-10-07T11:14:58Z)

[^spring-contract-intro]: [Spring Cloud Contract reference](<https://docs.spring.io/spring-cloud-contract/reference/index.html>) — Consumer/provider contract scope (vendor; retrieved 2026-10-07T11:14:49Z)

[^spring-contract-transition]: [Spring announces Stubborn transition](<https://spring.io/blog/2026/07/06/spring-cloud-contract-transition-to-stubbornsh/>) — End of Spring maintenance and release\-train removal (vendor; retrieved 2026-10-07T11:15:09Z)

[^spring-contract-first]: [First Spring Cloud Contract application](<https://docs.spring.io/spring-cloud-contract/reference/getting-started/first-application.html>) — DSL definitions, generated tests and required base class (vendor; retrieved 2026-10-07T11:15:09Z)

[^spring-contract-runtime]: [Generating stubs at runtime](<https://docs.spring.io/spring-cloud-contract/reference/project-features-stubrunner/stub-runner-generate-stubs-at-runtime.html>) — In\-progress contracts and unverified generated stubs (vendor; retrieved 2026-10-07T11:14:19Z)

[^stubborn-migration]: [Migrating to Stubborn Contract](<https://docs.stubborn.sh/contract/migration/from-spring-cloud-contract>) — Coordinates, DSL imports, JUnit and legacy\-property/stub compatibility (vendor; retrieved 2026-10-07T11:15:17Z)

[^pact-intro]: [Pact introduction](<https://docs.pact.io/>) — Consumer\-driven contracts by example (vendor; retrieved 2026-10-07T11:14:10Z)

[^pact-js-readme]: [Pact JS repository](<https://github.com/pact-foundation/pact-js/blob/master/README.md>) — JavaScript contract testing and framework integration (vendor; retrieved 2026-10-07T11:14:26Z)

Source revision: https://substitutefor.net/entities/Q878?revision=926
