A Typo Led to the Creation of Spring Cloud Contract • Marcin Grzejszczak & Jakub Pilimon • GOTO 2026

Marcin Grzejszczak, a Java Champion and Spring Cloud Contract contributor, discusses how a production-breaking typo led to the creation of Spring Cloud Contract. He outlines an AI-powered future for contract testing, leveraging production traffic and OpenAPI specs to generate and validate contracts automatically. Marcin also emphasizes that 'context' is the most underrated pillar of observability, transforming raw logs, metrics, and traces into actionable insights.

4 min read
A Typo Led to the Creation of Spring Cloud Contract • Marcin Grzejszczak & Jakub Pilimon • GOTO 2026
source: https://www.youtube.com/watch?v=D-yp3sB8cu0

Marcin Grzejszczak, a Java Champion and key contributor to the Spring ecosystem, recounts his 15-year career journey, marked by significant contributions to microservices architecture, contract testing, and observability. His career began in 2010 as a C++ developer in France, transitioning to Java and eventually joining Pivotal in 2015, where he worked extensively on the Spring Cloud framework. Currently, he’s at HeroDevs, focusing on long-term support for OSS libraries.

The Genesis of Spring Cloud Contract

Marcin’s time at a fintech company, undergoing digital transformation, exposed the classic challenges of microservices adoption. Inspired by Sam Newman’s “Building Microservices,” he co-created an internal open-source library called “MicroInfra Spring.” This toolkit addressed crucial microservices problems, including service discovery, distributed tracing, and early forms of contract testing. These foundational efforts were eventually contributed to Spring Cloud, leading to his recruitment at Pivotal.

The most pivotal moment in the evolution of what would become Spring Cloud Contract (originally Accurest) stemmed from a real production incident. A junior developer, applying the “Boy Scout rule” by fixing a typo in an API (e.g., changing interests to interest), inadvertently broke all dependent clients. The problem was that the server-side change went undetected because there was no mechanism to verify client-server compatibility, leading to a silent production failure. This incident highlighted the dire need for automated contract validation.

Spring Cloud Contract addresses this by reversing Ian Robinson’s consumer-driven contract concept. Instead of clients dictating server behavior, the server defines its contract and publishes stubs. Clients then test against these stubs, immediately detecting breaking changes like the aforementioned typo. Marcin candidly shares that some early code, like the JSON to JSON path converter class, was a source of embarrassment, even containing a Javadoc apology. This led to a unique architectural modeling session with Jakub Pilimon, involving users, to improve the library’s design.

AI’s Role in Future-Proofing Contract Testing

Marcin, referencing ideas from Tom Akehurst (author of WireMock), explores how AI can overcome the current limitations of contract testing, such as the high cognitive load and abandonment of manually written contracts. The proposed AI-powered workflow involves:

  1. Capturing Production Traffic: Live traffic data is collected (with careful consideration for security and data obfuscation).
  2. AI-Generated Contracts: AI processes this captured traffic to automatically generate contracts, potentially as WireMock stubs or Spring Cloud Contracts.
  3. OpenAPI Spec Validation: The generated contracts are then automatically checked against existing OpenAPI specifications. Inconsistencies (e.g., an AI-generated contract indicating an optional field while the OpenAPI spec demands it as required) can be flagged.
  4. Human in the Loop: Developers shift from manual contract writing to reviewing and approving AI-generated contracts, allowing them to focus on high-level validation and ensuring consistency. This significantly reduces the technical overhead and makes contract testing more sustainable, less reliant on individual “contract champions.”

Observability: The Critical Role of Context

Marcin, a key contributor to the Micrometer Observation API, argues that while logs, metrics, and traces are commonly cited as the three pillars of observability, the most underrated and crucial element is context. Isolated telemetry data, without understanding the why, is merely noise. Correlating these three pillars with relevant business or technical events—such as a deployment causing a performance drop—provides the necessary insight to understand the root cause and impact of issues. This holistic view is what transforms raw data into actionable intelligence.

Share post

Stay In The Loop! Subscribe to Our Newsletter.

Get updates straight to your inbox. No spam, just useful content.

Recommended for You

Spring Then & Now: What’s Next? • Rod Johnson, Arjen Poutsma & Trisha Gee

Spring Then & Now: What’s Next? • Rod Johnson, Arjen Poutsma & Trisha Gee

A panel discussion with Spring Framework creator Rod Johnson and veteran Arjen Poutsma, moderated by Trisha Gee. They discuss the evolution of Spring, the future of reactive programming in the age of virtual threads, their new AI agent framework Embabel, and the essential AI skills modern Java developers need to acquire.

Architecture for Flow • Susanne Kaiser & James Lewis

Architecture for Flow • Susanne Kaiser & James Lewis

In an interview with James Lewis, Susanne Kaiser discusses her book "Architecture for Flow," which synthesizes Domain-Driven Design, Wardley Mapping, and Team Topologies. She explains how this holistic approach helps design adaptive socio-technical systems by starting with the problem space, visualizing the value chain, and aligning team structures to the software architecture, all guided by her practical "Architecture for Flow Canvas."