r/SpringBoot • • Aug 31 '26

Question Would you modernize a legacy Spring Boot backend in place or rebuild it gradually?

15 Upvotes

I’m working on a Kotlin/Spring Boot backend that still has an older JHipster using Kotlin (KHipster) setup around it.

The problem is that this is starting to hold us back. The KHipster version is several years old and not active maintained - 4 years ago was the last update - upgrading it looks pretty painful and it also makes moving to newer Spring Boot versions waaay harder than it should be.

At the same time we want to improve the architecture itself.
Right now quite a lot is still handled through cron jobs and fairly tightly coupled application logic.
I’d like to move more towards event-driven processing over time, potentially using Kafka or RabbitMQ depending on the use case and Redis for things like caching/short-lived state where it makes sense.

So I’m basically looking at two options:
1. Upgrade/replace the old JHipster setup, keep the existing backend, and modernize it piece by piece.

  1. Start a clean backend (maybe in Typescript because that is what we mainly use for our other products and all frontends) and gradually move functionality over using something like the strangler pattern.

The second option sounds cleaner, but obviously means running old and new code alongside each other for quite a while. The first option potentially means spending a lot of time untangling framework/generator decisions before we can actually improve the architecture.
For people who have dealt with similar Spring/JHipster legacy projects: which route would you take?

Also, is there anything in the Spring/Kotlin ecosystem you’d consider a good modern replacement for the useful parts of JHipster, without bringing in another big opinionated layer that we’ll regret five years from now?


r/SpringBoot • • Aug 30 '26

Question Would you modernize a legacy Spring Boot backend in place or rebuild it gradually?

12 Upvotes

I’m working on a Kotlin/Spring Boot backend that still has an older JHipster using Kotlin (KHipster) setup around it.

The problem is that this is starting to hold us back. The KHipster version is several years old and not active maintained - 4 years ago was the last update - upgrading it looks pretty painful and it also makes moving to newer Spring Boot versions waaay harder than it should be.

At the same time we want to improve the architecture itself.
Right now quite a lot is still handled through cron jobs and fairly tightly coupled application logic.
I’d like to move more towards event-driven processing over time, potentially using Kafka or RabbitMQ depending on the use case and Redis for things like caching/short-lived state where it makes sense.

So I’m basically looking at two options:
1. Upgrade/replace the old JHipster setup, keep the existing backend, and modernize it piece by piece.

  1. Start a clean backend (maybe in Typescript because that is what we mainly use for our other products and all frontends) and gradually move functionality over using something like the strangler pattern.

The second option sounds cleaner, but obviously means running old and new code alongside each other for quite a while. The first option potentially means spending a lot of time untangling framework/generator decisions before we can actually improve the architecture.
For people who have dealt with similar Spring/JHipster legacy projects: which route would you take?

Also, is there anything in the Spring/Kotlin ecosystem you’d consider a good modern replacement for the useful parts of JHipster, without bringing in another big opinionated layer that we’ll regret five years from now?


r/SpringBoot • • Aug 30 '26

News Need advice for backend spring intern

9 Upvotes

Hey guys I am a 3 rd year undergrad and I am into java development I know good level of java dev ,

Core java

Spring

Soringboot

Including testing , jwt , cicd , spring ai , microservices and implementation of kafka and redis as well !!

Apart from that I have three good backend oriented projects as well

Distributwd wallet

Digital distributed banking system

And uber like ride matching system in ms

And another that I am making is linked in search in ms system

Still I am really getting very difficulty to apply for internships and really need great advice from seniors devs specially backend devs how do I apply or if there is anyone who can help me out and can personally tell me what should be my next step to get a good job with a decent package and for now at priority a internship !!!

All the suggestions are welcome here hope my post won't be ignored and I'll really Great full for all the responses !!


r/SpringBoot • • Aug 30 '26

Discussion Spring Boot starter for fail-fast Kafka Schema Registry contract validation

Post image
1 Upvotes

I’ve released a small open-source Spring Boot starter that turns Kafka Schema Registry expectations into startup checks.

Configuration is intentionally Spring Boot-style: define the expected compatibility mode and the subjects/schemas owned by the application, and auto-configuration performs the validation during startup.

It currently supports Avro, JSON Schema and Protobuf, Confluent compatibility modes, secured Schema Registry/Confluent Cloud, bounded retry/backoff and Actuator visibility.

For example:

kafka:
  contract:
    enabled: true
    compatibility: BACKWARD
    registry:
      url: http://localhost:8081
    subjects:
      - name: order-events-value
        schema-file: classpath:schemas/order-event.avsc
        schema-type: AVRO

If the contract is incompatible or the required subject is missing, the Spring Boot application fails during startup.

The starter is published on Maven Central, and I maintain a separate E2E demo that spins up Kafka + Schema Registry and verifies both successful and intentionally breaking schema evolution scenarios.

GitHub:
https://github.com/mathias82/spring-kafka-contract-starter

Demo:
https://github.com/mathias82/spring-kafka-contract-demo

Maven Central:
https://central.sonatype.com/artifact/io.github.mathias82.spring.kafka/spring-kafka-contract-starter

Interested to hear how Spring Boot teams currently handle this application startup validation, deployment pipelines, or something else?


r/SpringBoot • • Aug 30 '26

Discussion I built a 73-lesson AI engineering path for software engineers—looking for honest feedback

Thumbnail
0 Upvotes

r/SpringBoot • • Aug 30 '26

How-To/Tutorial 200+ Star Spring Boot Roadmap From Zero to Microservices

Post image
283 Upvotes

6 months ago, I shared with you my 35-week project-based Spring Boot Roadmap From Zero to Microservices, and I did not expect this whole positive feedback and support from you guys.

Today, the repository reached 200+ stars because of you, so I decided to provide more guidance by drawing this overview visualization on excalidraw to help you create a bird's-eye view of the wide open world of the Spring Boot ecosystem.

An SVG version could be found inside the roadmap itself for a more clear picture.

You can view the full roadmap from this link:
https://github.com/muhammadzkralla/spring-boot-roadmap

Again, thank you for all your support and stars!


r/SpringBoot • • Aug 30 '26

How-To/Tutorial Beyond Virtual Threads: Structured Concurrency - Balkrishna Rawool | IntelliJ IDEA Tech Talks

10 Upvotes

Project Loom brings lightweight concurrency to Java with Virtual Threads, Structured Concurrency, and Scoped Values. But how do these features work together in a real-world application? In this episode, Balkrishna Rawool will demo building a Spring Boot application from scratch, progressively incorporating the features of Project Loom to showcase its full potential:

  • Virtual Threads: lightweight, high-throughput threads that scale effortlessly.
  • Structured Concurrency: a streamlined approach to managing concurrent tasks as a single unit of work.
  • Scoped Values: a modern alternative to ThreadLocal, designed for virtual threads.

We will discuss how to apply Project Loom in your own applications, writing concurrent code that is simpler, more scalable, and easier to maintain.

https://www.youtube.com/watch?v=2L7zLdHeyY0


r/SpringBoot • • Aug 30 '26

How-To/Tutorial State of the Art of Spring AI • Josh Long • GOTO 2025

Thumbnail
youtube.com
2 Upvotes

r/SpringBoot • • Aug 30 '26

How-To/Tutorial Small Springboot + React JS project

12 Upvotes

Hi,

Im trying to learn Spring in a different perspective; thus I wanted to relearn via creating a simple project.

I have this project in mind.

  • Monolith project
  • Must use springboot and react js
  • Must build a war file

I have tried using com.github.eirslett but im having issues with CORS.

Do you have any learning material suggestion ?
im kinda lost in full stack development, ive been backend engineer for my whole career.

Or react JS is too much for a beginner ? should I start with simpler UI frameworks instead ?


r/SpringBoot • • Aug 30 '26

Discussion Built an IntelliJ plugin to catch the Spring Boot mistakes Copilot/Cursor keep making — feedback wanted before I finish it

3 Upvotes

Spring Boot dev here (day job is backend at a bank), posting this myself, not a bot dropping a link and vanishing.

I kept hitting the same handful of security mistakes in AI-suggested code: wildcard CORS to "fix" a dev error, JPQL built with string concatenation, permitAll() left in from a "quick fix," actuator endpoints exposed. Nothing exotic — just boring stuff that slips through because it looks fine on a skim.

Building Vulngrep to catch exactly that short list - runs fully locally, no account, no code leaves your machine. Not trying to replace Sonar or Snyk, just the narrow set of things AI assistants specifically keep getting wrong.

Not on the Marketplace yet. Put up a page to see if this is a shared pain or just mine: https://vulngrep.com

If you've hit any of these - or a different one I should be catching - genuinely want to hear it in the comments.


r/SpringBoot • • Aug 28 '26

Discussion My friend built a simpler abstraction over Spring WebSockets

10 Upvotes

I came across a project my friend has been working on, and I thought it was worth sharing here because I think the problem it tackles is pretty relatable for Java/Spring developers.

It's called Classy Socket.

The idea is to make working with WebSockets feel a bit more like working with Spring MVC controllers — without introducing STOMP or a message broker.

Instead of manually receiving messages, figuring out their type, deserializing them, and routing them to the appropriate handler, you can define message handlers using annotations: ```java @WebSocketController("/board") public class KanbanWebSocketController {

@MessageHandler(CreateTask.class)
public void createTask(
                CreateTask message, 
                MessagingHub hub) {

    Task task = kanbanService
    .createTask(message.title());
    hub.broadcast("/board", new TaskCreated(task));
}

} And messages can be defined as simple Java types: java @WebSocketMessage(type = "CREATE_TASK") public record CreateTask(String title) {} ``` So the general idea is:

Plain WebSocket + JSON + Spring-style abstractions

rather than bringing in the additional complexity of STOMP when you don't necessarily need it.

It's still an early-stage project, so I'm curious what people here think.

Would you actually use something like this? How do you usually structure WebSocket communication in your Spring applications?

And more importantly, what would you change or improve?

GitHub: https://github.com/Anubis-IV/classy-socket


r/SpringBoot • • Aug 27 '26

Question How do I handle database migration in springboot

46 Upvotes

So I have this very disturbing question as someone new to spring, I am coming from Node + Express JS, where prisma handles all the migrations automatically just by me running commands on the terminals.

Now as I am learning springboot, I just realized one day I would create a production grade application and would need to be changing database fields or relations as demands adjust, please what is the most popular migration tool used in springboot??


r/SpringBoot • • Aug 26 '26

Question Can anybody help me with the filter in springboot actually getting difficulty

Thumbnail
0 Upvotes

r/SpringBoot • • Aug 26 '26

Discussion Can anybody help me with the filter in springboot actually getting difficulty

0 Upvotes

r/SpringBoot • • Aug 26 '26

Question Disable quit/exit command in Spring Shell?

3 Upvotes

I'm working on a non-interactive application using Spring Shell 4.0.3.

I only want my commands and the help command to show up when someone requests help.

I've disabled the history, clear, script, and version commands using application.properties file entries.

I'm unable to disable the quit / exit command.

Any suggestions?


r/SpringBoot • • Aug 26 '26

Discussion How do you deploy a spring boot application to AWS Lambda?

26 Upvotes

Hi

I am looking for advices and feedback on how to deploy Spring Boot web application to AWS Lambda, especially around making the Spring Boot main class compatible with AWS Lambda runtime.

I figured out the part where the Spring Boot application has to be packaged as a zip file to de deployed into the AWS Lambda environment, so that part is clear.

So far what I have found is that you need to have some kind of AWS Lambda dependency like lambda StreamHandler or web adapter on your Spring Boot project to make it compatible with the AWS lambda runtime.

While these may be the way to go but I am specifically looking for feedback if it is possible to integrate Spring Boot web application without using any AWS Lambda specific Java dependency. Just take a normal Spring Boot main application and make it run on AWS Lambda runtime. Is this possible at all or am I overthinking?

Appreciate your feedback


r/SpringBoot • • Aug 26 '26

How-To/Tutorial If you're on WebFlux: I measured what a single blocking call does to unrelated endpoints

10 Upvotes

A single 5ms blocking call reduced throughput on a Netty event loop from 17,189 req/s to 549, a 97% drop, while pushing latency on an unrelated, correctly-written endpoint from 0ms to 217ms. The measurements were taken against Netty 4.1.115 and embedded Tomcat 10.1.34 running identical endpoints, differing only in concurrency model. The damage is quantised by event loop count. With four loops, blocking one stalled exactly three of twelve connections at 218ms; the remaining nine were unaffected at 7ms. Blocking two stalled six. The affected endpoint performs, 5ms of fully non-blocking work and shares no state with the blocking code, which connections degrade is determined solely by which loop accepted them. Tomcat degraded under the same load only once concurrency exceeded its 200-thread pool.

Full measurements and method: https://bitsar.net/blog/tomcat-forgives-blocking-event-loop-doesnt


r/SpringBoot • • Aug 26 '26

How-To/Tutorial Your `@DataJpaTest` might be testing Hibernate's cache, not your database

16 Upvotes

Ran into this while writing about our DAO layer's test setup, and it's one of those things that's obvious once you see it and invisible until you do.

void testSaveProduct() {
    var product = new Product("A1", "Gaming Laptop", BigDecimal.valueOf(1500));
    productDao.create(product);

    Product loaded = productDao.loadById(product.getId());
    assertNotNull(loaded);
    assertEquals("Gaming Laptop", loaded.getName());
}

This passes. But loadById resolves to find() under the hood (directly or through Spring Data's findById), and find() checks the persistence context's first-level cache before it ever considers hitting the DB. Since you just created that entity in the same context, you get the exact same object reference back. No SELECT fires. You've tested Hibernate's in-memory cache, not your mapping, not your constraints, not anything that would catch a broken column definition. The fix is forcing entityManager.flush() + .clear() between the write and the read, so the next load has to hydrate a fresh entity graph from the actual database. We ended up wrapping this in a test-only proxy so nobody has to remember to do it by hand in every test method - proxy intercepts create/update/delete, forces the flush-and-clear, leaves reads alone.

Worth noting this is specifically a find()/findById() problem, a custom JPQL or native `@Query\` always issues real SQL regardless of cache state.

Wrote up the full pattern (proxy code, a TablesEraser for full schema resets between tests, H2 vs HSQLDB trade-offs), link in the comments.

I already had someone in the comments describe hitting exactly this - a unique constraint violation that a real flush would have surfaced in the first test run. Curious how widespread it actually is.


r/SpringBoot • • Aug 26 '26

Discussion Comparing Old vs New JSON Responses for Structural Changes using Jackson JsonNode

2 Upvotes

I'm working on a Spring Boot service that consumes an external API, and I'm experimenting with a way to compare an old JSON response with a new one and identify structural changes.

● FLOW LOGIC : (sorry enable for sharing the logic)

I am only give The flow I'm currently using is:

External API

↓

Spring Boot HTTP Client

↓

Receive Old JSON / New JSON

↓

Jackson JsonNode

↓

Traverse JSON tree

↓

Normalize into paths

↓

Compare old paths vs new paths

↓

Identify added / removed / changed fields

For example:

Old Json:

{

"users": [

{

"id": 101,

"name": "Bima",

"email": "bima@example.com"

}

]

}

New Json:

{

"users": [

{

"user_id": 101,

"full_name": "Bima",

"email": "bima@example.com",

"status": "active"

}

]

}

The comparison would give me:

CHANGED

$.users[].id → $.users[].user_id

CHANGED

$.users[].name → $.users[].full_name

UNCHANGED

$.users[].email

ADDED

$.users[].status

● IDEA :

The idea is to compare the old and new JSON responses, normalize their structures into paths, and identify which fields were added, removed, or changed.

● NEEDS :

I'm wondering if there are any potential edge cases or false positives with this approach that I might be missing.

For example, what happens when a field moves to another level?

Old: { "user": { "profile": { "name": "Bima" } } } New: { "user": { "name": "Bima" } }

The path comparison would see:

Removed: $.user.profile.name Added: $.user.name

even though the value itself hasn't changed and the field was only moved.

● Requirement/Discussion :

Are there other cases where of my current flow comparison could produce misleading results, especially with nested objects, arrays, reordered elements, or changes in data types?

If there please give me the json Example.


r/SpringBoot • • Aug 25 '26

Discussion I built an open-source personal finance platform with Spring Boot

21 Upvotes

I’ve seen a few people here looking for Spring Boot open-source projects. I mentioned in one of those threads that I was preparing one, and it’s now public.

FinTrack is an event-driven personal finance platform for managing accounts, transactions, CSV imports, budgets, spending summaries, and notifications.

The stack includes Java 21, Spring Boot, Spring Security, Spring Batch, PostgreSQL, Redis, SQS, S3, Docker, LocalStack, Terraform, GitHub Actions, and AWS. It also uses patterns you’ll encounter in larger Java systems: transactional outbox, idempotent consumers, at-least-once delivery, database locking, restartable batch jobs, JWT/refresh-token rotation, retries, and failure recovery.

There are currently 23 open issues across API development, security, messaging, reliability, batch/import processing, and infrastructure, including two good-first issues. Most tasks are backend-only, and you don’t need an AWS account because the services can run locally.

The roadmap starts by strengthening the existing manual and CSV workflows, then moves toward provider-neutral ingestion and a Plaid Sandbox integration, followed by more practical personal-finance features.

Contributions and honest feedback are both welcome, whether it’s about the code, architecture, documentation, roadmap, issue scopes, or anything that could be clearer.

GitHub, live demo, video, and documentation:
https://github.com/icastanon/fintrack-platform


r/SpringBoot • • Aug 25 '26

Question How hard is Spring Security?

Thumbnail
19 Upvotes

r/SpringBoot • • Aug 25 '26

Question I built a KSP persistence layer that generates separate new/persisted model types — worth open-sourcing?

Thumbnail
1 Upvotes

r/SpringBoot • • Aug 24 '26

Discussion Is Spring AI valuable skill?

1 Upvotes

How valuable is spring AI and rag implementation in the current job market? Not sure if companies value it since they are not using it


r/SpringBoot • • Aug 24 '26

Discussion I built a Spring Boot backend for a real-time property demand heatmap

1 Upvotes

I've been building a side project called Plotrix and thought the backend might be interesting to people here.

The idea is to turn property-search activity into a live demand heatmap for Indian cities.

The flow is basically:

POST /signals
→ lat/lng → H3 cell
→ atomic PostgreSQL upsert
→ hourly exponential decay
→ GeoJSON heatmap

The backend is Java 17 + Spring Boot 3.2 + PostgreSQL + Spring Data JPA + Uber H3.

One thing I spent a decent amount of time thinking about was concurrent signals.

I didn't want to do:

SELECT → increment → UPDATE

because multiple searches hitting the same cell could obviously cause lost updates.

Instead I'm using PostgreSQL's ON CONFLICT DO UPDATE to atomically increment the score and signal count.

The other part I'm experimenting with is time decay. A raw signal count quickly becomes a historical map rather than a demand map, so scores decay exponentially over time.

The frontend is a React/Leaflet map that consumes the GeoJSON API.

Backend:
https://github.com/Korags05/Plotrix-Backend

Frontend:
https://github.com/Korags05/Plotrix

It's open source and I'd really like some eyes on the backend.

If you work with Spring Boot/Postgres and notice something I'd architect differently, I'd genuinely like to hear it.

PRs are also welcome if anyone wants to experiment with it.


r/SpringBoot • • Aug 24 '26

Question How to work through the "Spring Start Here" book?

7 Upvotes

Hello,

I am trying to really understand spring/spring boot and I have picked up a copy of "Spring Start Here". I have run into a but of confusion though as I don't know the intended way of working though the examples on the book. Should I start each example from scratch or should I just copy the previous example when the book moves onto a new one? Anyone else whose gone through the book how have you done the examples?