IBM Bob Java Modernization: Migrating Legacy Struts Application into a Modern React & Spring Boot Microservices
In this document, you will find detailed guidance on how to use IBM Bob, an AI-powered software engineering assistant that helps modernize legacy Java applications with speed, accuracy, and confidence.
In this demo, we modernize PKS Auto Insurance, a monolithic Java application built with Struts 1.3, JSP views, and Hibernate 3.5, running on Java 6.
Using a series of simple prompts, Bob transforms this 20-year-old monolithic application into a modern microservices-based platform built with Spring Boot 3.x, PostgreSQL, JWT-based security, and a React 18 frontend. The solution includes generated documentation, automated tests, deployment assets, and operational artifacts.
You can see the classic Struts project files here
This is LoginAction.java — a Struts Action class.
Here's the struts-config.xml — all URL mappings, form beans, and action forwards configured in XML.
And here is the service layer , where the business logic is tightly coupled to the application architecture and lacks automated unit test coverage and all.
This is exactly the kind of legacy code that Bob is designed to modernize.
Now let's see Bob in action. We simply describe what we want in the prompt.
-
Download this repo to local folder.
-
Delete the modernized folder.
-
Open the folder in IBM bob,
-
Provide the following prompt to IBM Bob :
I have a legacy Java application that I want to modernize into a ReactJS frontend, Spring Boot and Tomcat-based microservices, PostgreSQL database, and deploy on OpenShift.
I need Bob to perform the following tasks:
Analyze the existing application code.
Create an HTML document describing the current application, including its architecture, technology stack, application inventory, dependencies, and other relevant details.
Prepare SRE documentation in HTML format.
Identify and recommend microservices based on Domain-Driven Design (DDD) principles and document them in HTML format.
Create a Bounded Context Map and provide it in HTML format.
Convert the monolithic application into microservices.
Create a traceability matrix between the legacy application and the modernized solution in HTML format.
Create database migration documentation in HTML format.
Perform the database migration to PostgreSQL.
Generate unit test scripts.
Create unit test case documentation in HTML format.
Create integration test case documentation in HTML format.
Generate integration test scripts.
Create a DevSecOps pipeline plan and documentation in HTML format.
Generate Jenkins pipeline scripts for the DevSecOps implementation.
Create Jenkins installation and configuration scripts for OpenShift.
Create deployment scripts and manifests for deploying the microservices on OpenShift.
Additionally, I want to run and test the application on my local Mac. Please provide the required steps, setup instruction, scripts and etc in HTML format.
Please start by analyzing the application and then generate the deliverables one by one in the order listed above.
Bob immediately begins reverse-engineering the legacy codebase by extracting business rules, mapping domain models, and identifying bounded contexts. It then forward-engineers a complete modernized platform based on its analysis.
Within moments, three independent Spring Boot microservices appear: user-service, vehicle-service, and premium-service — each with its own schema, security configuration, REST API, and test suite.
The React frontend, Docker Compose file, Jenkins pipeline, OpenShift manifests, and HTML documentation files are all generated in parallel.
- Navigate to the generated modernized folder (or its equivalent output directory) to review the generated source code, documentation, configuration files, and deployment assets.
What makes Bob truly powerful is that the conversation continues. As we test the application, we encounter real-world issues — and we fix them with plain English prompts.
- You can give the prompt to remove the Flyway dependency.
Bob removes the Flyway dependency from all three Maven projects, eliminates Flyway-related configuration from the application configuration files, and generates standalone SQL scripts suitable for manual database initialization.
The frontend was experiencing cross-origin request failures due to missing CORS configuration.
- Provide a prompt asking Bob to resolve the CORS issue.
Bob identified the root cause and updated the services accordingly.
In the user-service, Bob added a CorsConfigurationSource bean within the SecurityConfig class.
For the vehicle-service and premium-service, Bob configured the required CORS mappings to allow frontend access.
These changes enable secure and reliable communication between the React frontend and the backend microservices.
- You can give the prompt to fix the SPA issue.
With a simple prompt, Bob transforms the user interface into a modern React single-page application (SPA), providing a seamless and responsive user experience.
- Provide a prompt requesting modernization documentation.
With a single prompt, Bob generates a collection of comprehensive, client-ready HTML documents covering every aspect of the modernization process—from reverse-engineering activities and domain discovery to migration validation and confidence scoring.
These documents are ready to share with stakeholders immediately.
Here is the converted and migrated application.
Let's take a moment to walk through everything Bob has produced.
Fifteen HTML documentation files — a complete modernization knowledge base.
Click me for more info
The generated file is available here
It includes the following contents.
- Executive Summary
- Technology Stack
- Architectural Overview
- Application Inventory
- Database Schema
- Business Functions
- Premium Calculation Algorithm
- Security Assessment
- Maven Dependency Inventory
- Technical Debt & Modernization Blockers
- Target Architecture Summary
Click me for more info
The generated file is available here
It includes the following contents.
- Service Inventory & Ownership
- Service Level Objectives (SLOs)
- SLI Definitions
- Service Level Agreements (SLAs)
- Health Checks
- Alerting Rules
- Incident Management
- Capacity Planning
- HPA Policy
- Observability Stack
- Backup & Disaster Recovery
- Change Management Release Gates
- Key Operational Runbooks
- Toil Reduction Targets
Click me for more info
The generated file is available here
It includes the following contents.
- Domain Discovery & Strategic Design
- Identified Bounded Contexts
- Recommended Microservices
- REST API Contracts
- Data Ownership Rules
- Inter-Service Communication
- Domain Events
- Decomposition Rationale
Click me for more info
The generated file is available here
It includes the following contents.
- Introduction
- Context Map Diagram
- Context Relationship Details
- Integration Patterns Applied
- Team Topology
- Colour Legend
Click me for more info
The generated file is available here
It includes the following contents.
- Action Classes → REST Controllers
- Service Layer → Service Layer
- DAO Layer → Repository Layer
- Domain Model → JPA Entities
- View Layer → React Components
- Configuration → Modern Configuration
- Security Improvements Summary
Click me for more info
The generated file is available here
It includes the following contents.
- Migration Strategy
- Schema Changes: CUSTOMER → users
- Schema Changes: VEHICLE → vehicles
- Schema Changes: USER_ROLE → user_roles
- Data Migration Scripts
- SQL Init Scripts
- Rollback Plan
Click me for more info
The generated file is available here
It includes the following contents.
- user-service — UserServiceTest
- vehicle-service — VehicleServiceTest
- premium-service — PremiumServiceTest
- JwtUtil — JwtUtilTest
- Test Coverage Targets
Click me for more info
The generated file is available here
It includes the following contents.
- User Registration & Authentication Flow
- Vehicle Registration Flow
- Premium Quote End-to-End Flow
- Admin Operations Flow
- Profile Update Flow
- Test Environment Setup
Click me for more info
The generated file is available here
It includes the following contents.
- Pipeline Architecture
- Pipeline Stage Definitions
- Security Gates Summary
- Branch & Trigger Strategy
- Artifact Management
- Compliance & Audit Requirements
Click me for more info
The generated file is available here
It includes the following contents.
- Prerequisites
- Quick Start via Docker Compose
- Manual Development Setup
- Testing the API Manually
- Running Tests Locally
- Troubleshooting
- Environment Variables Reference
- Useful Development Commands
- Default Login Credentials
Click me for more info
The generated file is available here
It includes the following contents.
- Overview
- Reverse Engineering Activities
- Forward Engineering Activities
- Traceability Chain
- Knowledge Preservation
- Tooling & Automation
- Risk Management in RE/FE
Click me for more info
The generated file is available here
It includes the following contents.
- Validation Philosophy
- Validation Layers
- Functional Equivalence Verification
- Quality Gates
- Regression Strategy
- Test Coverage Matrix
- Defect Classification & Resolution
- Validation Checkpoints Timeline
- Non-Functional Validation
- Evidence & Audit Trail
Click me for more info
The generated file is available here
It includes the following contents.
- Executive Overview
- Team Structure & Roles
- Domain Expertise Applied
- Technical Expertise Applied
- Legacy Knowledge Preservation
- Critical Domain Decisions
- Expertise Continuity
Click me for more info
The generated file is available here
It includes the following contents.
- Migration Strategy Overview
- Migration Phases
- Code Conversion Approach
- Component Classification
- What Was Not Auto-Converted (Manual Items)
- Migration Completeness Tracking
- Data Migration
- Code Metrics
Click me for more info
The generated file is available here
It includes the following contents.
- Overview
- Confidence Score Model
- Per-Artifact Confidence Scores
- Overall Project Confidence
- How Behavioral Equivalence Is Measured
- Confidence Degradation Factors
- Issue Registry (Found During Review)
- Confidence Score Trend
- Sign-off Matrix
Using a series of natural-language prompts, Bob generated three independently deployable Spring Boot 3.x microservices running on Java 21, secured with JWT and BCrypt authentication, backed by PostgreSQL, tested using Testcontainers, containerized with Docker, and prepared for deployment to OpenShift through a DevSecOps pipeline.
The result is more than a code conversion exercise. The client receives a complete modernization package, including production-ready source code, automated tests, deployment assets, operational runbooks, validation evidence, architecture documentation, and migration confidence metrics.
Together, these deliverables provide a clear path from legacy modernization to production deployment while preserving business functionality and improving maintainability, scalability, and operational readiness.











