Recent Posts
Archives

Posts Tagged ‘Broadcom’

PostHeaderIcon [SpringIO2026] Hybrid Modernization: Combining OpenRewrite’s Precision with LLM Intelligence for Spring

Lecturer

Raquel Pau is a technical product manager at Broadcom (formerly VMware Tanzu). She brings extensive experience in Java developer tools, continuous-integration and continuous-delivery platforms, and internal developer platforms. Previously she worked as an engineering manager at Moderne, the company behind OpenRewrite, and held product-management roles at CloudBees focused on developer productivity. She has spoken at multiple Spring I/O editions as well as Devoxx, JavaConf and JavaZone. Her background combines deep technical knowledge of code-transformation tooling with product thinking about how large organizations can keep their application portfolios modern and consistent.

Abstract

Code modernization is not a single problem. Upgrading a Spring Boot application within the same major version, migrating from JAX-RS to Spring MVC, and rewriting a COBOL batch job into Spring Batch demand fundamentally different strategies. This article explores the taxonomy of modernization tasks proposed by Raquel Pau and the hybrid methodology that pairs OpenRewrite’s deterministic, type-aware recipes with the semantic reasoning power of large language models. Concrete demonstrations illustrate how upgrade plans are calculated from Maven metadata, how skills orchestrate recipe execution followed by LLM-driven semantic fixes, and how a structured DSL extracted from legacy code guides a full rewrite while preserving contracts and enabling incremental delivery.

Deterministic versus Non-Deterministic Transformations

Modernization tools fall into two broad categories. Deterministic tools always produce the identical output for a given input. Renaming a method, updating a package import, or replacing a deprecated Spring API are deterministic operations. OpenRewrite belongs to this category: it operates on a lossless semantic tree that retains type attribution obtained from the compiler, applies visitor-based recipes, and preserves the original formatting of the source. Because the transformation is deterministic, recipes can be unit-tested with high confidence and executed at scale across hundreds of repositories without surprise.

Non-deterministic problems admit many correct answers. Generating documentation, extracting the business intent of a filter, or inventing an idiomatic Spring Security configuration from a set of JAX-RS name-binding annotations are examples. Large language models excel here because they reason over patterns and can synthesize higher-level constructs that do not exist in the original code. The cost, however, is variability, the need for evaluation harnesses, and a tendency to hallucinate when internal libraries or proprietary APIs are outside the model’s training distribution.

OpenRewrite’s limitations are the mirror image of its strengths. It cannot perform runtime analysis; dependency injection and reflection mean that many object relationships become visible only after the application starts. It cannot invent new semantic abstractions; a mechanical translation of JAX-RS filters into Spring filters often leaves residual compilation errors or suboptimal configurations that require human or LLM insight. Cross-language migration is outside its design scope.

Coding agents partially compensate for these gaps by using pattern-based reasoning and by iterating until the project compiles. Yet they lack default type attribution, suffer from context-window constraints, and generate large volumes of tokens before reaching a stable state. The rational strategy is therefore hybrid: apply deterministic recipes first to shrink the problem, then invoke the LLM only for the residual semantic work.

Three Levels of Modernization

Pau organizes modernization into three progressively more demanding levels.

Upgrades remain inside the same framework family. A Spring Boot 3.3 application is moved to Spring Boot 4, simultaneously updating transitive dependencies such as Jackson and JUnit. Because Spring’s release train is not strictly linear and because organizations maintain internal frameworks with their own release cadences, a simple “latest version” recipe is insufficient. An upgrade-plan engine inspects Maven metadata, calculates a sequence of compatible intermediate steps, and emits a series of small, reviewable pull requests. Each step leaves the application in a buildable state. Tanzu’s Application Advisor exposes this capability via the cf repo upgrade plan and cf repo apply upgrade plan commands, demonstrating that continuous, low-risk upgrades can be embedded in CI pipelines.

Migrations change the underlying framework while preserving language and runtime. The canonical example is Jakarta JAX-RS to Spring Boot. Name-binding annotations that attach filters to resources have no direct counterpart; authentication filters must become Spring Security configurations; repositories must acquire @Repository annotations. The recommended skill therefore first executes the OpenRewrite recipes that perform the mechanical rewrite and any accompanying Spring Boot upgrade, then hands control to the coding agent to resolve remaining compilation errors and to map name-binding semantics onto Spring constructs. The result is both more complete and far less expensive in tokens than asking an unconstrained LLM to rewrite the entire application.

Full rewrites discard the original implementation while preserving contracts. A COBOL batch program that sorts records by date and amount must become a Spring Batch job that reads the same input format, produces identical output, and respects the same database schema if one is involved. Because legacy systems rarely possess comprehensive tests, the process begins by extracting a catalog of user stories, then a structured domain-specific language description of inputs, outputs, and processing steps. Only after the human reviewer validates the generated tests and the semantic model does the agent emit Spring code, typically seeded by a skeleton obtained from start.spring.io. Incremental delivery is essential: large monolithic rewrites cannot be reviewed or risk-managed in a single step.

Orchestrating OpenRewrite and LLM Agents

Three integration mechanisms allow a coding agent to invoke OpenRewrite without saturating its context window. Local MCP servers expose the rewrite CLI so that only the command and its concise output enter the conversation. Skills package the same CLI invocation and are loaded only when the agent decides the skill is relevant. Prompts can be registered with a remote MCP server, yet they must be fully present in every conversation and therefore scale poorly for complex migrations.

The hybrid skill for a JAX-RS migration therefore looks roughly as follows: calculate the upgrade plan that includes the JAX-RS recipes, execute the recipes, collect residual compilation diagnostics, and finally apply semantic transformations that replace name-binding filters with Spring Security and Spring MVC constructs. Because the deterministic phase has already performed the bulk of the mechanical work, the LLM operates on a far smaller residual problem and produces higher-quality results.

For full rewrites the skill is organized into three explicit phases. Phase one extracts a user-story catalog and stores it under version control so that subsequent runs reuse the analysis. Phase two materializes a structured DSL for a chosen story, including acceptance criteria, data models, and external contracts. Phase three generates the Spring implementation and correlating tests. Human validation remains mandatory; the agent cannot be trusted to invent missing requirements or to decide whether an original implementation was correct.

Practical Demonstrations and Organizational Implications

In the upgrade demonstration a Spring Petclinic application on Boot 3.3 is analyzed; the engine proposes coordinated upgrades of Spring Boot, Jackson and JUnit; successive apply steps produce small, reviewable diffs that leave the project green after each commit. In the migration demonstration a pure JAX-RS Petclinic is transformed: OpenRewrite rewrites the bulk of the code, the agent resolves compilation issues caused by signature changes, and name-binding annotations disappear in favor of proper Spring Security configuration. In the rewrite demonstration a simple COBOL sorter is analyzed, a single user story and its DSL are generated, a Spring Batch project is scaffolded, and the resulting executable produces byte-for-byte identical output.

The organizational payoff is standardization. When every application can be moved to a common Spring Boot baseline with low friction, teams share libraries, security configurations and operational practices. Token consumption drops dramatically because deterministic recipes eliminate the majority of mechanical work. Evaluation of non-deterministic skills becomes feasible because the residual problem set is smaller and more homogeneous.

Conclusion

Modernization success depends on matching the tool to the nature of the transformation. OpenRewrite supplies precision, testability and scalability for deterministic changes. Large language models supply the semantic insight required for migrations and rewrites. A carefully designed hybrid that keeps the LLM outside the hot path of routine upgrades, that constrains its context to residual problems, and that forces explicit contracts for full rewrites yields both higher quality and lower cost. Organizations that adopt this disciplined approach can keep large application portfolios current without sacrificing reviewability or operational safety.

Links:

PostHeaderIcon [DevoxxBE2025] Spring Boot: Chapter 4

Lecturer

Brian Clozel contributes as a core developer on Spring initiatives at Broadcom, emphasizing reactive web technologies and framework integrations. Stephane Nicoll leads efforts on Spring Boot at Broadcom, focusing on configuration and tooling enhancements for developer efficiency.

Abstract

This review investigates Spring Boot 4.0’s enhancements, centering on migrations from prior releases, null safety integrations, dependency granularities, and asynchronous client usages. Framed by Java’s progression, it assesses upgrade tactics, utilizing JSpecify for null checks and Jackson 3 for serialization. Via an upgrade of a gaming matchmaking component, the narrative appraises effects on dependability, throughput, and creator workflow, with consequences for non-reactive concurrency and onward interoperability.

Progression of Spring Boot and Migration Drivers

Spring Boot has streamlined Java creation through automated setups and unified ecosystems, yet advancing standards require periodic refreshes. Release 4.0 retains Java 17 baseline, permitting utilization of fresh syntax sans runtime shifts. This constancy supports organizations with fixed setups, while adopting trials like Java 25’s terse entry points shows prospective alignment.

Migration commences with harmonizing imports: refreshing the overarching POM or incorporating the import plugin secures uniform releases. In the matchmaking component—retrieving gamer details and metrics—the shift uncovers obsoletions, like pivoting from RestTemplate to RestClient. This advancement tackles constraints in blocking clients, fostering adaptable substitutes.

Framed historically, Spring Boot 4 tackles demands for robust, streamlined scripts. Null annotations, embedded through JSpecify, avert operational null errors via build-time inspections. Activating these in assemblers like Gradle identifies risks, as observed when marking elements like gamer identifiers to require non-empty states. This anticipatory safeguard lessens deployment faults, harmonizing with trends toward dependable, foreseeable solutions.

Import refinements additionally frame the shift: precise modules permit discerning additions, refining sizes. For example, isolating network from essentials evades superfluous inclusions, boosting compartmentalization in varied rollouts.

Embedding Progressive Traits and Safeguards

Spring Boot 4 embeds null markers throughout its framework, employing JSpecify to heighten type reliability. In the matchmaking, applying @NonNull to arguments and attributes guarantees build-time confirmation, identifying lapses like unset variables. This system, when triggered in Gradle through assembler flags, merges fluidly with editors for instant alerts.

Jackson 3 embedding typifies updating: advancing from release 2 entails setup tweaks, like activating rigorous null inspections for unmarshalling. In the illustration, unmarshalling gamer metrics gains from refreshed presets, like refined variant management, curtailing templates. Bespoke extensions, like for temporal types, become inherent, rationalizing arrangements while preserving congruence.

The pivot to RestClient for network exchanges handles non-synchronous demands sans responsive models. In the component, substituting blocking invocations with concurrent runs through StructuredTaskScope exemplifies this: spawning duties for details and metrics, then merging outcomes, halves delays from 400ms to 200ms. Triggering trial traits in assemblies permits exploration, offering response cycles for nascent Java proficiencies.

These traits jointly bolster reliability and proficiency, alleviating frequent snares like null accesses and linear constrictions, while upholding Spring’s creator-centric philosophy.

Empirical Shift and Throughput Boosts

Shifting the matchmaking involves orderly phases: refreshing Boot initiators, addressing obsoletions, and polishing setups. Preliminary executions after shift reveal matters like mismatched Jackson releases, rectified by direct inclusions. The component’s API termini, managing gamer lining, gain from polished monitoring: Micrometer’s refreshed gauges offer profounder views into invocation delays.

Non-synchronous boosts through RestClient display methodical grace: building clients with root URIs and timeouts, then running concurrent fetches for details and metrics. Fault management merges organically, with reattempts or reserves adjustable sans responsive types. Throughput records affirm parallelism, showing concrete advances in capacity for demanding contexts like gaming infrastructures.

Import oversight progresses with detailed artifacts: selecting spring-boot-starter-web minus integrated hosts fits encapsulated rollouts. This choosiness lessens artifact dimensions, hastening assemblies and rollouts in automation chains.

The illustration stresses successive authentication: executing coherence checks after alterations assures conduct uniformity, while trial traits like task scopes are switched for trials. This orderly tactic lessens hazards, synchronizing shifts with functional truths.

Extensive Consequences for Java Framework

Spring Boot 4’s progressions solidify its place in contemporary Java, linking conventional and responsive models while adopting syntax advancements. Null inspections elevate script caliber, diminishing flaws in deployment settings. Jackson 3’s embedding streamlines information handling, backing progressing norms like JSON boosts.

For creators, these alterations boost output: self-setups adjust to fresh presets, while utilities like DevTools endure for swift cycles. Consequences stretch to expandability: concurrent network invocations sans reactors fit conventional groups shifting to parallelism.

Prospective paths encompass profounder Java 26 embedding, possibly firming trials like task scopes. Journal assets elaborate these, directing communal embrace.

In overview, Spring Boot 4 polishes the framework’s bases, nurturing safer, efficacious solutions through considerate progressions.

Links:

  • Lecture video: https://www.youtube.com/watch?v=4NQCjSsd-Mg
  • Brian Clozel on LinkedIn: https://www.linkedin.com/in/bclozel/
  • Brian Clozel on Twitter/X: https://twitter.com/bclozel
  • Stephane Nicoll on LinkedIn: https://www.linkedin.com/in/stephane-nicoll-425a822/
  • Stephane Nicoll on Twitter/X: https://twitter.com/snicoll
  • Broadcom website: https://www.broadcom.com/

PostHeaderIcon [SpringIO2019] Spring I/O 2019 Keynote: Spring Framework 5.2, Reactive Programming, Kotlin, and Coroutines

The Spring I/O 2019 Keynote, featuring Juergen Hoeller, Ben Hale, Violeta Georgieva, and Sébastien Deleuze, offered a comprehensive overview of the latest developments and future directions within the Spring ecosystem. The keynote covered significant themes, including the advancements in Spring Framework 5.2, enhancements in Reactive programming, and the growing importance of Kotlin and coroutines in Spring applications.

The keynote served as a crucial update for the Spring community, highlighting how the framework continues to evolve to meet modern application development needs, from high-performance reactive systems to seamless integration with modern languages like Kotlin.

Spring Framework 5.2 Themes

Juergen Hoeller, co-founder and project lead of the Spring Framework, presented the key themes for Spring Framework 5.2. These themes focused on refining existing capabilities and introducing new features to enhance developer experience and application performance. While specific details were covered, the overarching goal was to continue Spring’s tradition of providing a robust and flexible foundation for enterprise applications.

Improvements to Reactive: Core/UX, R2DBC, RSocket

Ben Hale and Violeta Georgieva discussed the ongoing advancements in Reactive programming within the Spring ecosystem. They highlighted improvements to the core Reactive capabilities, focusing on enhancing user experience (UX) and developer productivity. The session also delved into R2DBC (Reactive Relational Database Connectivity), a specification for reactive programming with relational databases, and RSocket, an application-level protocol for reactive stream communication. These developments underscore Spring’s commitment to building highly scalable and responsive applications.

Kotlin and Coroutines

Sébastien Deleuze focused on the deepening integration of Kotlin and coroutines within Spring. Kotlin’s concise syntax and functional programming features, combined with the power of coroutines for asynchronous programming, offer significant benefits for modern Spring applications. Deleuze demonstrated how these technologies enable developers to write more expressive, performant, and maintainable code, further solidifying Kotlin as a first-class language for Spring development.

The Evolution of the Spring Ecosystem

The keynote collectively showcased Spring’s continuous evolution, driven by innovation and community feedback. The speakers emphasized how Spring is adapting to new paradigms in software development, such as reactive programming and multi-language support, while maintaining its core principles of productivity and flexibility. The discussions provided a roadmap for developers to leverage the latest features and best practices for building next-generation applications.

Conclusion

The Spring I/O 2019 Keynote offered a compelling vision for the future of Spring, demonstrating its adaptability and continued relevance in the rapidly changing landscape of software development. Attendees gained valuable insights into key areas of focus and practical applications of the latest Spring technologies.