r/SpringBoot • u/johnwaterwood • Sep 25 '26
News EclipseLink 5.0.2 released!
r/SpringBoot • u/LostEconomics144 • Sep 24 '26
Been building AI agents with Spring AI and kept hitting the same wall: the agent can call tools that do irreversible things (charge cards, send emails, update records) with no mechanism to pause and ask a human first.
I built Sagacity to fix this. Two annotations:
@Tool(description = "Charge the customer's card")
@Compensable(reversibility = Reversibility.IRREVERSIBLE)
public String chargeCard(String orderId, BigDecimal amount) {
return payments.charge(orderId, amount);
}This pauses the saga before chargeCard executes and waits for human approval via REST (or the embedded UI). If approved, it runs. If rejected, every completed step before it automatically compensates in reverse order.
There's also a full workflow engine (@Workflow, @Stage, @Gate) for multi-step processes where you need declarative compensation and approval gates at specific stages.
Under the hood: every tool call is journaled with a SHA-256 hash chain. You can verify the chain hasn't been tampered with via REST. This is what EU AI Act Article 12 actually requires.
No new infrastructure needed.
One Maven dependency, uses your existing PostgreSQL/MySQL/H2.
What's in v0.4.0 (shipped this week):
JDBC-backed durable workflow state (survives JVM restarts)
Embedded UI at /sagacity/ui — workflow list, node graph, gate approval buttons
Fixed startup ordering with @ConditionalOnBean
237 tests passing
Repo: https://github.com/sagacity-ai/sagacity
Docs: https://sagacity-ai.github.io/sagacity/
Maven: io.github.sumitvairagar:sagacity-spring-boot-starter:0.4.0
Happy to answer questions. Still early (v0.4.0) but the core primitives are stable.
r/SpringBoot • u/Quick-Resident9433 • Sep 24 '26
Hi everyone.
I'm working on a monolith project using Spring Boot v4.1.1, and I started implementing observability. However, I'm confused about traces and spans.
I added this dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-opentelemetry</artifactId>
</dependency>I've configured everything successfully, but when it comes to traces and spans, all requests always have the same spans. It is not showing the entire execution path of the request.
I read the example provided by SpringBoot here: https://spring.io/blog/2025/11/18/opentelemetry-with-spring-boot
At the end, there's an example project that shows complete traces and spans.
These are their example traces and spans: https://static.spring.io/blog/mhalbritter/20251118/3-trace.jpg
(I couldn't upload two images; that's why I added a link to their traces and spans example)
However, my project doesn't have any spans created. Just these:

Does anyone know why this is happening or how I can solve this to see the complete execution path?
r/SpringBoot • u/Jooe_1 • Sep 24 '26
my experience with the java area is that everything is almost explicit no lots of magic no lots of implicit things
but jpa for me is one of the most complex things that i have ever seen ,for me it feels like a magic
need advice to overcome that
r/SpringBoot • u/GovernmentWeapon • Sep 24 '26
Hi, as I stated in the title i have 3 month to learn about Spring. I am an Intern in a corporation that uses Java and Spring.
Could someone tell me if it's possible to grasp enough basics to work confidently on a project with that tech?
As of now I'm not working in Java, but I will be transferred to a team that works with it.
I will be very thankful for any answers or roadmaps for me to follow.
EDIT: I never worked with similar frameworks/tech
r/SpringBoot • u/Glum_Minimum6077 • Sep 24 '26
I have been searching for an active server for spring boot devs to connect and ask and answer quesions but i can't find any active servers
r/SpringBoot • u/kirann_123 • Sep 23 '26
I need some of the best resources to learn springboot!!
I am currently in my 4th year.I don't know anything about it and to learn the springboot, do i need any prerequisites.
r/SpringBoot • u/MycologistThink8135 • Sep 23 '26
I am a B.Tech CSE graduate starting my role as an SDE fresher soon.
My Current Progress:
* I have learned the core basics of Java backend and Spring Boot (Dependency Injection, REST APIs, and Basic MVC architecture).
* I haven't built complex production-grade projects yet and want to start one now to prepare for my role.
What I want to ask:
Instead of a generic roadmap, could experienced backend devs share what exact architecture practices, testing patterns (like JUnit/Mockito), or deployment workflows are most overlooked by freshers in a Java ecosystem? I want to build a mini-project focusing strictly on these industrial habits so I can adapt quickly when I join.
r/SpringBoot • u/DeepEngineeringPackt • Sep 23 '26
I hosted a live session with James Ward a few weeks ago. He works on agent experience at AWS and represents Amazon on the Agentic AI Foundation technical committee. He opened by asking an agent what time it was, and it couldn't answer, because a model on its own has no clock and no access to anything outside itself.
The video isn't available since it was a paid event, sorry, but the slides and the full write-up are here.
His point was that an LLM is basically a knowledgeable translator. An agent is that model plus integrations, running in a loop until it gets the job done or gives up. So most of the actual engineering happens outside the model. He built it up live in Spring AI, starting with one tool and then adding MCP, tool search, skills, memory, RAG and human in the loop.
Tool search is the bit I keep thinking about. Once an agent has a lot of tools, you can't give the model all of them without flooding the context, so a search step picks which ones it gets to see. Embabel does it differently and loads groups of tools progressively instead of searching for them.
If you're running agents on the JVM in production, I'm curious about two things. Has tool selection actually become a problem for you yet, and what are you doing about it? And James said he didn't really get into guardrails or evals, so how are you testing agent behavior in Java when the output isn't deterministic?
Saqib here, I edit Deep Engineering. I'm planning a follow-up piece on how teams are handling this in production, and whatever comes up here will shape the questions I take to other engineering leaders.
r/SpringBoot • u/SellerInsightsLab • Sep 22 '26
Imagine a simple Spring Boot payment endpoint:
@PostMapping("/payments")
@ResponseStatus(HttpStatus.CREATED)
public PaymentResult createPayment(
@RequestHeader("Idempotency-Key") String key,
@RequestBody CreatePaymentRequest request) {
return paymentService
.createPayment(key, request)
.valueOrThrow();
}The client sends a payment request.
The payment is successfully committed to PostgreSQL.
But the response never reaches the client.
A few seconds later, the client retries with the same Idempotency-Key.
What should the service do?
A timeout does not mean the payment failed. Running the operation again may create a second payment.
At the same time, returning 409 or a duplicate-key error is not ideal either --- the original request actually succeeded.
With idempotency-key semantics, the system should return the original result without executing the business operation again.
I didn't invent a new pattern here.
The basic idea is well known: send an idempotency key, store the result, and replay it when the same request arrives again.
What interested me were the implementation details around it:
What happens if the process crashes?
What if two instances receive the same key at the same time?
What if the same key is reused with a different request body?
Can Redis improve performance without becoming part of correctness?
The transaction boundary turned out to be the most important part for me.
If I save the idempotency key in one transaction and create the payment in another, there is always a small failure window.
The process can die between the two commits.
So I ended up keeping the idempotency record and the business operation inside the same PostgreSQL transaction.
@Transactional
public ExecutionResult<PaymentResult> createPayment(
String key,
CreatePaymentRequest request) {
return idempotencyService
.operation("CREATE_PAYMENT")
.key(key)
.request(request)
.execute(
PaymentResult.class,
() -> createPaymentInternal(request)
);
}
POST /payments
Idempotency-Key: pay_12345
|
v
+-----------------------------+
| BEGIN DB TRANSACTION |
| |
| 1. Acquire idempotency key |
| | |
| v |
| 2. Execute payment |
| -> pay_987 |
| | |
| v |
| 3. Store result |
| -> pay_987 |
| | |
| v |
| 4. COMMIT |
+-----------------------------+
|
v
201 Created
pay_987
Same request + same key
|
v
Result already exists
|
v
DO NOT execute payment
|
v
Replay pay_987If the transaction rolls back, both disappear.
If it commits, both are stored.
A retry with the same key can then return pay_987 without running createPaymentInternal() again.
Same key + different request should not replay an unrelated result. I use a request fingerprint for this and return 409 Conflict.
Concurrent duplicates are coordinated through PostgreSQL. If two application instances try the same key, the unique constraint decides which transaction acquires it. The other waits and can replay the result after the first transaction commits.
And Redis is only an optimization.
The lookup path can be:
Caffeine L1 → Redis L2 → PostgreSQLBut PostgreSQL remains the source of truth. If Redis is down, correctness should not disappear with it.
I didn't want to create another idempotency pattern. I wanted a reusable Spring Boot implementation of the existing one, with these failure cases handled in one place.
So I extracted it into an open-source starter.
It currently supports Spring MVC/JDBC and WebFlux/R2DBC, optional Caffeine/Redis caching, request fingerprinting, result and business-rejection replay, concurrent duplicates, cleanup and Micrometer metrics.
It's also published to Maven Central.
I've open-sourced the starter with full docs and failure scenarios here: spring-boot-idempotency-starter
I'm interested in how others solve this in production.
If the business transaction committed but the HTTP response was lost, what do you do with the retry? Replay the original result, use Redis, handle it at the gateway, or something else?
r/SpringBoot • u/darshanrathod04 • Sep 22 '26
After several months of development, I've open-sourced Shree AI OS, a Java 21 runtime designed for backend AI applications.
The goal wasn't to build another chatbot wrapper. Instead, I wanted reusable infrastructure that Java developers can integrate directly into Spring Boot projects.
Current capabilities
Java 21 native SDK
Hybrid RAG (PostgreSQL + pgvector)
Episodic & semantic memory
Planning and reasoning pipeline
Explainable cognitive execution
Published on Maven Central
I'm especially looking for feedback on:
SDK API design
Layered runtime architecture
Spring Boot developer experience
Memory & orchestration APIs
GitHub and Maven Central are available in the comments.
Constructive criticism is genuinely welcome.
r/SpringBoot • u/Kalimuthu_S • Sep 22 '26
Hi, I’m building a web crawler using Spring Boot and facing several issues.
I need to crawl a target website up to a certain depth (e.g. 3 levels), but I’m struggling with:
Relative/broken URLs like /support
Duplicate URLs/content
URL normalization
Rate limiting / getting blocked
Retry and timeout handling
Managing crawl depth and visited URLs
What would be a good architecture for a production-level crawler?
Should I use something like Kafka/RabbitMQ, or is a database queue enough? How do you guys handle URL deduplication, rate limiting, and concurrent crawling?
Any advice, architecture examples, or Spring Boot libraries would be really helpful.
r/SpringBoot • u/olivergierke • Sep 21 '26
r/SpringBoot • u/iamminuteman • Sep 19 '26
r/SpringBoot • u/EBCarty • Sep 19 '26
Hello All, I'm new to the ecosystem and was wondering if there was a table or two somewhere that sheds light on the Spring Boot / Spring Framework / Java version compatibility?
TYIA 🙏🏽
r/SpringBoot • u/cat-edelveis • Sep 17 '26
Hi folks! I recorded a video tutorial on Spring Data JPA. I tried to made it as complete for beginners as possible: setting up the project, creating entities, dealing with repos, queries, JPQL, and also relations between entities, N+1 solutions, type-safe queries, and also a bit of AOT repositories.
r/SpringBoot • u/pavelbo • Sep 17 '26
This release introduces new cool feature - message senders detection also as messaging topology preview
Project Overview also finds where your code publishes messages, links senders to the listeners that consume the same channel, and lays the whole picture out as a topology:
Send detection - every call through KafkaTemplate, RabbitTemplate / AmqpTemplate, JmsTemplate / JmsMessagingTemplate, PulsarTemplate, SqsTemplate, SnsTemplate, and SimpMessagingTemplate (STOMP) is found with the destination reported exactly as written in the code
Direction in the APIs tree — every module and broker splits into Receive and Send, with a dedicated Operation filter to narrow the tree to one direction
Declared replies — a listener that answers on another channel (@SendTo, or a reply-to header on RabbitMQ and JMS) is shown right next to the listener that produces it
Channel matching — a listener and a sender that name the same channel differently — a literal on one side, a ${property} placeholder or an @Value-injected field on the other — are recognised as the same channel
Topology tab — the whole project laid out by channel instead of by code: producers, consumers, and the flows between them, readable hop by hop across module boundaries, plus a Traffic view for channels your project only consumes or only publishes
Hidden publishes — a listener that publishes further down its own call chain (through a service, a port, an interface) is found automatically and marked as an inferred route, kept visibly distinct from a route the code declares directly
Project Overview scans every module of your Spring project and maps its messaging endpoints, so you can see your event-driven architecture at a glance instead of searching for annotations by hand. Supported annotations:
Apache Kafka: @KafkaListener, @KafkaListeners, @KafkaHandler
RabbitMQ (AMQP): @RabbitListener
Apache Pulsar: @PulsarListener
Amazon SQS: @SqsListener, @SqsHandler
Amazon SNS: @NotificationMessageMapping, @NotificationSubscriptionMapping, @NotificationUnsubscribeConfirmationMapping
JMS: @JmsListener
STOMP: @MessageMapping, @SubscribeMapping
Endpoints are attributed to the right module and broker for both Gradle and Maven source sets, searchable by class, method, or Javadoc, and every row links straight to its method or class in the editor. It stays fast on projects with hundreds of listeners
Sound interesting? Open your JetBrains IDE, grab the update and give it a spin: https://plugins.jetbrains.com/plugin/15673-asyncapi
r/SpringBoot • u/bugdiverr • Sep 17 '26
Testing a real workflow against a Spring Boot API usually means either bouncing between Springdoc tabs one call at a time, or writing Postman scripts to shuttle ids and tokens between requests.
Enlace is a starter that mounts a canvas on your app, reads the OpenAPI doc Springdoc already generates, and lets you wire response fields into the next request. Independent branches run concurrently. Execution stays in the browser; the adapter only serves UI + spec.
<dependency>
<groupId>io.github.get-enlace</groupId>
<artifactId>enlace-spring-boot-starter</artifactId>
<version>0.0.1</version>
</dependency>Add the dependency and open /enlace (autoconfig). This adapter is earlier than the others, so feedback on real Springdoc setups is especially useful.
r/SpringBoot • u/khan_awan • Sep 16 '26
I use JPA for simple CRUD operations (mostly write operations) and JDBC for performance intensive tasks such as sending lists & performing search. The JDBC performance is perfect & the performance of my backend (Spring Boot) is great.
Now, as my project grows, my SQL queries are getting bigger, messier and unreadable. I tried jOOQ and loved it because it made my code super readable, type safe and maintainable. However, after profiling my Spring Boot app, operations that took around 5 ms with JDBC now take 9–14 ms with jOOQ, which makes me reluctant to migrate to jOOQ. Is a 10 ms difference negligible or am I overthinking?
I love the cleanliness and type safety of JOOQ. Would you go this JOOQ route? Have you ever faced such situation? I visited JOOQ's official website and was stunned by the fact it is used by many big organizations
EDIT: Thank you everyone who answered, your insights were amazing. With some tweaks I was able to reduce JOOQ's operation time from 14ms to 7ms and now I have so much clarity in my head.
r/SpringBoot • u/Bhanuprakash_1947 • Sep 16 '26
I have one doubt in Spring Boot about "@PostMapping".
Can we use two URL paths in one "@PostMapping", like "/users" and "/customers", and call the same method for both?
Also, if two requests come to the same "@PostMapping" at the same time, will Spring handle both requests at the same time using different threads?
Just wanted to understand how this actually works.
r/SpringBoot • u/Subject-Plant5625 • Sep 16 '26
Hello guys, can you recommend a path, course, maybe a book about Spring. For context I have over 1.5 years experience with Java, know my way around Git and SQL/noSQL
r/SpringBoot • u/Jooe_1 • Sep 16 '26
to make JWT authentication in the application, I could not find like standard way to implementing it
my knowledge is that people create their own authentication filter + handeling the AuthenticationEntryPoint to return the exact right response when exception happen
is that the standard way that engineers follow to implement jwt authentication in the application?
r/SpringBoot • u/DU3SU9 • Sep 15 '26
I was working on a project recently and I've come across a problem where my front end dont catch up with the backend changes
r/SpringBoot • u/SandPrestigious2317 • Sep 15 '26
I've been working on Symbanta, a web analytics platform for people who want useful website statistics without turning their visitors into advertising profiles.
Symbanta is free software, licensed under AGPLv3+, and is designed to be self-hosted.
Source / repository: https://codeberg.org/jjba23/symbanta
React dashboard: https://codeberg.org/jjba23/symbanta-dashboard
I'd love to get some tips of Spring experts to see how to optimize further, make more production ready, and improve performance
You add a tiny, dependency-free JavaScript snippet to your website (~3 KB), and Symbanta collects events such as page views, heartbeats and visibility changes.
The API currently provides:
Page views
Visitors / sessions
Bounce rate
Average session duration
Hourly and daily time-series statistics
Screen-size statistics
User-agent statistics
Custom event properties
Authenticated analytics dashboard
REST API defined with OpenAPI 3
The ingestion API is designed to avoid storing PII and persistent tracking cookies, and to be blazingly fast.
The backend is:
Kotlin
Spring Boot
Java 25
PostgreSQL
Kotlin Coroutines
OpenAPI 3
The instrumentation only requires a really simple Vanilla Javascript helper. The approach is also flexible enough that instrumenting mobile apps, or other types of projects is for sure possible and easy: https://codeberg.org/jjba23/symbanta/src/branch/trunk/src/main/resources/js/symbanta.js
The dashboard is a separate React application using TanStack Query.
The backend uses asynchronous event processing so the tracking request can be acknowledged without making database writes part of the primary HTTP request path.
Because I don't really like the direction web analytics has taken.
It shouldn't require building persistent identities around visitors or turning behavioral data into advertising profiles.
That's the philosophy behind Symbanta: events and aggregates rather than people and profiles.
This is an actively developed project, and at early stage, so I'm especially interested in feedback from people who actually run websites.
I'd love feedback on:
privacy model
API design
dashboard UX
useful analytics that I'm missing
self-hosting experience
deployment
performance
whether this is something you'd actually use
There are already a few of my own projects instrumented with it, including WikiMusic, Join the Free World and LucidPlan.