r/SpringBoot Jun 11 '26

News Spring and Security In The Times Of AI

Thumbnail
spring.io
8 Upvotes

r/SpringBoot Jun 11 '26

News Spring Boot 4.1.0 available now

Thumbnail
spring.io
108 Upvotes

r/SpringBoot 17h ago

How-To/Tutorial Migrating to Spring Boot 4. The parts your AI agent will miss

Thumbnail
youtube.com
57 Upvotes

Here's a migration guide to Spring Boot 4.

Of course you can delegate it to an AI agent. No problem with that.

But you still need to understand what it changed and why, to catch the cases where the app compiles, tests pass, and something silently breaks in prod.

Are you still migrating manually? Or are you handing it to an agent?


r/SpringBoot 20h ago

Question Spring Boot vs FastAPI/Django for a fresher with no placement support — which is actually more viable?

Thumbnail
5 Upvotes

r/SpringBoot 1d ago

Question Migrating a large legacy banking application to Maven + Spring Boot 4 + JDK 25 simultaneously - is this a possible approach?

Thumbnail
11 Upvotes

r/SpringBoot 1d ago

News LarkBatis: A build-time MyBatis compiled to plain Java

Thumbnail larkbatis.github.io
1 Upvotes

r/SpringBoot 2d ago

How-To/Tutorial I open sourced my spring boot + spring ai project

34 Upvotes

Hey folks,

I’ve open sourced Windrunner, a self-hosted project management tool built with Spring Boot 4 + Spring AI for backend. If you are learning Spring Boot, I hope the project gives you something practical to explore — a complete application with an API, database, user interface, authentication, LLM/AI integrations, and more.

Github: https://github.com/shzlw/windrunner

The backend uses:

  • Spring Boot and Spring MVC for the application and REST APIs
  • Spring Data JDBC for database access
  • PostgreSQL for storage
  • Flyway for SQL database migrations
  • Spring AI’s MCP server support for exposing tools to AI clients
  • LLM Provider integrations for OpenAI, Anthropic, and Gemini
  • Docker and Docker Compose for running the application locally

The repository is a monorepo containing more than the Spring Boot backend. It also includes:

  • A React frontend
  • A TypeScript-based CLI tool
  • Playwright-based API end-to-end tests

If you’re interested in seeing how these pieces work together in one project, the repository provides examples across the backend, frontend, CLI, and testing layers.

Disclosure: I am the author of the project. Feel free to ask any questions, feedbacks or raise issues! ❤️


r/SpringBoot 1d ago

How-To/Tutorial hey can aneyone tell form where shouild i learn spring and spring boot

Thumbnail
0 Upvotes

r/SpringBoot 2d ago

News I built an IntelliJ plugin that shows where Java code performs I/O

28 Upvotes

When reviewing Java/Spring Boot code, I pay the most attention to I/O calls to see where we are leaving the process and potentially "slowing down" the application. This would involve following a call through several methods to find out whether it eventually reached a repository, HTTP client, or any other I/O invocation.

I built an IntelliJ plugin called Lattency to make that visible in the editor.

It adds gutter markers for database, HTTP, messaging, and file I/O. It also follows calls through project code, so methods that reach I/O transitively are marked with a dimmed version of the relevant icon.

Hovering over a marker shows the complete sink chain, and clicking it lets you navigate to any method along that chain.

The analysis is entirely static. It does not run the application, make network requests, or collect telemetry. Common Java and Spring APIs work without configuration, and project-specific clients can be described in a committed lattency.yml.

It is free and open source:

Marketplace: https://plugins.jetbrains.com/plugin/33937-lattency
GitHub: https://github.com/josipmusa/lattency

It currently supports Java projects in IntelliJ IDEA 2025.2 and newer. Kotlin is not supported yet.


r/SpringBoot 2d ago

Discussion When Transactional Outbox polling starts putting too much load on PostgreSQL — what do you do?

Post image
1 Upvotes

I like the Transactional Outbox pattern and use it quite often.

But I was thinking about one problem that can become important in production: database polling.

Of course, polling can be optimized. Good indexes, batching, SKIP LOCKED, partitioning, longer polling intervals — there are many options.

But if we want lower latency, we usually need to poll more often. This means more queries, more DB connections and more work for PostgreSQL.

We can use Debezium/CDC, and for many systems this is probably the right choice. But it also adds Kafka Connect, Debezium and more infrastructure to operate.

So I wanted to try a simpler idea:

Keep PostgreSQL as the source of truth, but don't use it as a queue during normal operation.

I built this flow:

DB transaction → afterCommit → Memory Queue → Batch Publisher → Kafka

The business data and Outbox event are saved in one transaction as usual.

After commit, only the eventId goes to the Memory Queue. The publisher takes IDs in batches, loads events from PostgreSQL and sends them to Kafka.

So there is no continuous polling for new events in the normal flow.

If the application crashes, the event is still safely stored in PostgreSQL. A Recovery Worker finds unpublished events and puts them back into the same queue.

The idea is basically:

Memory Queue for the fast path. PostgreSQL for durability and recovery.

I didn't want to stop at an architecture diagram, so I built a working Spring Boot project and started testing the idea with something closer to production conditions.

It has Kafka, PostgreSQL, batching, idempotency, recovery, Gatling load tests, Grafana metrics, tracing and structured logs.

Now I can run load tests and actually see what happens with PostgreSQL, the queue, publishing latency and recovery.

I'm interested in what other Spring Boot developers think about this approach.

Would you use something like this in production?

Maybe you have already solved the same problem in another way — optimized polling, Debezium, LISTEN/NOTIFY or something else?

Here is the project:

https://github.com/KHolodilin/spring-transactional-outbox-kafka

If you find the idea useful, feel free to ⭐ the repo or fork it. There are also a few open issues for contributors if you want to try something yourself.

Any feedback is welcome. I'm still experimenting with the approach and improving the project. 🚀


r/SpringBoot 2d ago

Question BEST SOURCES TO LEARN SPRING BOOT FROM SCRATCH TO ADVANCE 🤔

0 Upvotes

r/SpringBoot 3d ago

Discussion Roast my code / architecture

6 Upvotes

I’m building a project called Kite (https://github.com/gwynejsn/kite) and tried combining Spring Modulith with full Clean/Hexagonal Architecture inside each module, but I’m starting to wonder if I’ve just created a mountain of boilerplate. Take a look at the repo and roast the layout. What am I needlessly overcomplicating, and how would you simplify it?


r/SpringBoot 3d ago

Question spring boot backend

0 Upvotes

What is the recommended sequence of topics for learning Spring Boot backend development?"


r/SpringBoot 3d ago

News Idempotency4j - Redis storage provider is now available

11 Upvotes

A while ago I shared idempotency4j here - a Java/Spring Boot library for handling idempotent HTTP requests using the idempotency key header - following the IETF draft spec for the Idempotency-Key header.

I've now added Redis as a storage provider, alongside the existing JDBC and in-memory implementations.

The behavior remains the same : duplicate requests return the previously stored response without rerunning the endpoint, while reusing a key with a different request body is rejected.

If you give the Redis provider a try, I'd be glad to hear what works, what doesn't, and anything you think could be improved. Issues and constructive criticism are very welcome.

Github : https://github.com/josipmusa/idempotency4j
Maven spring boot starter: https://central.sonatype.com/artifact/io.github.josipmusa/idempotency-spring-boot-starter


r/SpringBoot 3d ago

How-To/Tutorial Race condition with SSE

7 Upvotes

Hi all, I am trying to build a real time notification service with SSE emitter but I am facing a pecuilar case of race condition which im not able to solve even via AI as it gives the same solution again and again.

scenario of cause:

I have a scheduler running every 20 mins that checks the Map of uid mapped sse emitters and pings the client. If the ping is successfull nothing happens, if error happens due to disconnection the sse emitter obj is removed via sse.complete() and then uid is removed form the list.

#pseudo code
Map<String, SseEmitter> connections = new ConcurrentHashMap<>();

onConnect(String userId){
  SSE emitter = new new SseEmitter()
  connection.add(userId,emmitter);

  // onCompletion(), onTimeout(), onError() -> removeIf()
}

@scheduler(20mins)
checkDisconnection(){
  //iterate the map and check for disconnection if found add it to remove list
  List<string> disconnectedUsers = (adding disconnections)

  //iterate the map from disconnected user -> force complete sse if needed and                    remove user from map


}

where it breaks is if the client manually refreshes the browser at the same time the scheduler to check disconnection is invoked

why it happens:

when the browser is refreshed, the application tries to recreate the connection at which the scheduler tries to ping and sees no connection for the user. Problem is I have kept automatic reconnections on in client app but it still doesnt see an error in client. im confused. Have I had the approach wrong?

Any help will be appreciated and sorry for the questions confuse you, Il try to make it proper once i get the time.

TECH : javascript event source, springboot, kafka for scaling and mongo for scheduled notifications.


r/SpringBoot 4d ago

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

14 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 4d ago

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

Post image
269 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 4d ago

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

13 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 4d ago

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 4d ago

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 5d ago

How-To/Tutorial Small Springboot + React JS project

14 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 4d ago

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

Post image
0 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 4d ago

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

Thumbnail
0 Upvotes

r/SpringBoot 5d ago

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

Thumbnail
youtube.com
0 Upvotes

r/SpringBoot 4d ago

Question Backend in spring boot

0 Upvotes

What is the best and easy way to learn backend in spring boot framework? Should I go with videos or docs or anything else? Currently I am in 3rd year so is one year enough to complete? And also suggest me best resources?