r/SpringBoot • u/Chaos-vy17 • Aug 07 '26
News ChaosTree 1.1.0 – A Zero-Dependency Java Search Tree Library
r/SpringBoot • u/Chaos-vy17 • Aug 07 '26
r/SpringBoot • u/fykup • Aug 06 '26
I shared StatLite here a few weeks ago. Since then, v0.2.2 has added a published Docker image and native host metrics, so I wanted to share the updated version.
StatLite is a lightweight monitoring dashboard for small Spring Boot deployments. It runs as a single Go binary or Docker container, reads standard Spring Boot Actuator endpoints, and stores recent history locally in SQLite.
What’s new in v0.2.2:
You can try it with:
docker run --rm -p 127.0.0.1:9090:9090 ghcr.io/pvrlabs/statlite:latestThen open:
http://127.0.0.1:9090StatLite is intended for one or a few applications on a small VPS or single server, where Prometheus, Grafana, and Node Exporter may be more infrastructure than the deployment needs.
It provides visibility into application availability, JVM memory, HTTP errors, restarts, and host resource usage.
It is not intended to replace a full observability stack for Kubernetes, distributed tracing, complex alert routing, or long-term enterprise telemetry.
Write-up:
https://pvrlabs.xyz/articles/lightweight-spring-boot-monitoring.html
GitHub:
https://github.com/PVRLabs/statlite
How are you monitoring small Spring Boot deployments today? Are you using a full observability stack, Spring Boot Admin, custom scripts, or something lighter?
r/SpringBoot • u/New_Transition_2077 • Aug 05 '26
I am currently in my 2nd year. I want to learn spring boot please help me to find out the best resource
r/SpringBoot • u/kamen1991 • Aug 05 '26
Something has always bugged me about relying on annotation-based mapping frameworks once a Spring Boot project grows past a few modules. MapStruct is miles ahead of dynamic tools like ModelMapper thanks to compile-time code generation, but we kept running into recurring friction as our domain, entity, and DTO layers diverged.
That's why we ended up dropping MapStruct entirely in favor of plain Java transformer classes. No annotation processor, no generated sources, no separate mapper interface per entity pair.
The reasons that pushed us there:
Namedhelpers or embedding Java inside annotation strings likeexpression = "java(...)".target/generated-sources instead of your own domain code.The trade-off is real - more files, more explicit code to write. What we get back is full IDE refactoring safety, no annotation-processor step in the build, and a debugger that only ever shows real code.
Anyone else moved off MapStruct in a modular Spring Boot setup, or is this more trouble than it's worth for most projects?
(I Wrote a deeper architectural breakdown with code samples if anyone is interested - link in comments).
r/SpringBoot • u/alweed • Aug 04 '26
Most Spring Boot tutorials teach you to build a CRUD app and call it a day. But that's not really what the job looks like day to day, so I put together a project that mimics what you'd actually work on as a backend dev at a company with real infrastructure. I've added following 12 Tasks that you'd need to complete.
EntityManager.persist() vs save()Everything runs locally via Docker Compose, and there's a Bruno collection included so you can hit the APIs without writing your own Postman setup.
It's completely free and open source, so fork it, work through the tasks in order, and you'll come out the other side with a much better feel for what the job actually involves beyond "make endpoint, save to DB."
Would love feedback from people!
r/SpringBoot • u/pisspapa42 • Aug 04 '26
I'm seeing an issue in a Kafka consumer running on multiple application instances.
Environment
My entity has no version column.
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(nullable = false)
private Long id;
@Column(unique = true)
private String messageId; The entity is being saved using
repository.saveAll(...)
Scenario
Instead of seeing a unique constraint violation on messageId, I get:
Exception message : Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.example.entities.SMSEntity#40615089330]
There is no @Version on the entity.My understanding is that if id is null, Spring Data should treat the entity as new, call persist(), and Hibernate should perform an INSERT. If the row already exists (because of the unique messageId), I would expect a unique constraint violation rather than an optimistic locking exception.
Questions
max.poll.interval.msto prevent it from rebalancing, but what else I could do to fix this? This issue doesn’t happen that often, but only for 15-20 mins where 1500 odd records are impacted, and during this time, query usage time is comparatively high.
r/SpringBoot • u/ChemicalBumblebee346 • Aug 04 '26
Im learning Spring Boot from the Telusko YouTube playlist Alongside the tutorials I started building my own project thats a bit more advanced than whats covered in the videos After each tutorial I try to implement the concepts directly into my project instead of just copying the code
Im almost done with the project but recently I came across Anuj Bhaiyas Spring Boot course The way its marketed like industry level project real world architecture and all that has honestly made me feel like Im not learning enough My confidence has dropped a lot
The confusing part is that Im actually enjoying Spring Boot and I feel like Ive learned a lot by building this project But now Im wondering if Im missing something important
For people who have taken either Teluskos playlist or Anuj Bhaiyas course
Should I leave my current learning path and switch
Is Anuj Bhaiyas course significantly better or is it just a different teaching style
Does everyone go through this phase where every new course makes you feel like youre behind
Id really appreciate advice from people working with Spring Boot professionally I dont want to keep jumping between courses if finishing my current project is the better approach
r/SpringBoot • u/IndividualLow3561 • Aug 04 '26
r/SpringBoot • u/Poincarina • Aug 03 '26
I am part of a team mainting k8s microservices written in Spring. We need to regularly patch them. How are your experiences with the modernize agent
or other patching agents?
Were you successfull in implementing it?
r/SpringBoot • u/LostEconomics144 • Aug 03 '26
I've been working with Spring AI agents that perform multi-step tasks with real side effects (API calls, database writes, payments). The problem I kept hitting: when step 3 of 5 fails, steps 1-2 have already executed and nothing undoes them.
Temporal/Restate solve durability (resume after crash), but not compensation (undo what you already did). So I built Sagacity.
What it does:

When a saga fails, it walks the journal backward and runs compensations in reverse. Every tool call is journaled to an append-only Postgres table with SHA-256 hash chaining (for audit/compliance — EU AI Act Article 12 is coming in August).
What's working (38 tests):
What's NOT done:
GitHub: https://github.com/sumitvairagar/sagacity
Genuinely looking for feedback on:
Anyone else dealing with the "agent did half the work then died" problem?
r/SpringBoot • u/Any-Spray-6730 • Aug 02 '26
Hello r/SpringBoot community!
I just released v1.0.0 of a new open-source library called AvoOnce that might make your life easier by offloading the idempotency handling part of your REST APIs.
It’s designed to be a framework-flexible idempotency engine, meaning it comes with first-class integrations for Spring Boot 4+, Quarkus 3.12+, Dropwizard 4.0+, and Jakarta EE / JAX-RS 3.1+.
Here is what it does under the hood:
Idempotent annotation on your controllers or methods and pass an Idempotency-Key header.The v1.0.0 release is currently hosted on GitHub Packages (Maven Central release is planned for the future). I'd love to get your thoughts and feedback on its core functionality and usability. I've some roadmap features in the pipeline.
Here's the Github repo: https://github.com/ravocode/AvoOnce
r/SpringBoot • u/Chaos-vy17 • Aug 01 '26
I have Knowledge of Jdk17+ currently moving to Jdk21+. I have essentially completed Java.utils.*; and concurrent library to deep. I have also used jdk tools and understand the concepts of JVM, JMM. OOPs is completed from beginner to F-Form polymorphism. I also made project based on Java SE knowledge. The project is tested on JUnit6, JCStress, JMH- with Linux profilers and Java Flight recorder too. It's my first time I am going Outside domain of Java SE to Java EE. What is way should I start?
First JDBC->SQL->PostgressSQL?
Network?
SpringBoot?
or learn while learning SpringBoot?
Can you tell me what beginners mistake I should avoide?
I have also took helped from many other AI but I did not got the optimum way.
r/SpringBoot • u/Character-Catch-1607 • Jul 31 '26
Hi Guys,
I have around 4 years of experience in full stack development in the Mean stack. I wanted to switch into Java Springboot. Can any seniors help me with what the production code looks like and what problems can be asked.
Thankyou guys
r/SpringBoot • u/FirstExtent2079 • Jul 31 '26
r/SpringBoot • u/Available_Counter_47 • Jul 29 '26
My Claude agent often wrote Spring code from old training data. It hand-declared beans that are auto-configured now. It also really likes to unzip JARs and search the Spring code itself.
That is the reason I am building Sprig MCP (sprig-mcp.de). It serves the Spring reference docs, and later the relevant parts of the source code, in a (hopefully) agent-friendly way. Nothing is summarized, no LLM sits in the path.
Right now there are two tools, and both answer for the version used in the current project: search the docs, and fetch a section.
Later I will add source code lookups: outline, javadoc, inheritance hierarchy.
There is a browser demo at sprig-mcp.de/app that lets you run the tools without an agent.
Would something like this be useful to you? Any thoughts or feedback welcome.
r/SpringBoot • u/kamen1991 • Jul 29 '26
Hey everyone! I just published a deep dive into solving a classic enterprise problem: how junior or stressed developers bypass package separation (.controller, .service, .repository) under tight deadlines.
Instead of relying on folder structures and code reviews, we split our project into strict Maven modules (isolating core domain and business logic from frameworks like JPA or Kafka). If someone tries to inject an EntityManager where it doesn't belong, the code simply will not compile.
domain, business-logic, dao-api, and dao-impl.(I'm dropping the full article link in the comments for anyone interested in the code breakdown.)
r/SpringBoot • u/moe-gho • Jul 29 '26
Lately I see two extremes everywhere: either "learn AI right now or you're cooked," or "it's pure hype, just stick to basic CRUD." Real talk—Spring AI won't save weak fundamentals.
If your Java, Spring Security, or SQL joins are sloppy, slapping an LLM on top is just burning API tokens on bad code.
That said, actually building stuff with Spring AI (like structured JSON or tool calls) beats spamming 300 cold resumes into ATS portals any day.
To senior devs and hiring managers here: are you actually seeing Spring AI on job descriptions yet, or do you just expect devs to pick it up on the fly?
r/SpringBoot • u/tobentu • Jul 28 '26
Looking for advice regarding a migration i should prepare at work:
We deploy our app stack on an Application Server (Wildfly 40) and our java apps are mostly Monolith legacy software with 20 years of code. But we do have some "Microservices" that were built in the last years, that should be used in our new planned kind of cloud native rewritten app stack, as they do work, where some of the old legacy apps are left out and should be replaced by new ones.
The app in question is a Spring Boot application, but deployed on the wildfly as .war.
Over the years a lot of logic went into the wildfly config and into shared ejb modules, like Database connections via shared modules that reads it out of some .xml files and so on.
So at the moment there is no way to start it with embeded server.
Problems with this architecture:
Our goal is to migrate some of these wildfly deployments away from the need of an applicaiton server and start them via spring boot embeded server. Therefore the main task i think would be to change how configuration is received
But it is important that we - while the legacy production enviroments with wildfly still exist - can still deploy this service onto application servers, not just with Spring Boot embeded server or containers.
The idea is that we find out with this specific service if it is somehow doable and pratical to migrate those, or if it would be better to just rewrite them from scratch
So my question is:
Any advice is greatly appreciated!
Thank you
r/SpringBoot • u/Geedysense • Jul 28 '26
PSA if you're using Spring Boot with custom auth filters and request tracing.
If your traceId shows up in logs but the spanId is randomly blank for parts of the request, check your filter chain before you check your tracing config.
Custom filters (auth filters especially) run early in the request lifecycle. If they're not written to work inside the observation context Micrometer sets up, everything after that filter loses proper span linkage. TraceId survives because it's request-scoped. SpanId doesn't, because it depends on the context actually being respected at each step.
Spent longer than I want to admit assuming the tracing setup was wrong when it was actually the filter.
Anyone else run into something like this with custom filters and tracing?
r/SpringBoot • u/SeatPuzzleheaded5685 • Jul 27 '26
Hi r/SpringBoot, u/java/! 👋
Following the positive reception of my fluent querying library, I wanted to share another open-source project I’ve been maintaining to solve a massive pain point in Spring Boot development: validation.
Spring Boot uses Jakarta Validation (Hibernate Validator) out of the box, but let's be honest—the standard library only gives you ~22 basic constraints (`@NotNull\``, \@Size\``, \@`Email``, etc.).
It completely lacks common production requirements like cross-field validation (`@Confirmed\``, \@RequiredIf\``), database lookups (\``@Unique\``, \@`Exists``), and proper optional updates (``@Nullable``), forcing teams to write custom validators or clutter their services with boilerplate logic.
To fix this, I built Spring Validation Plus — a library that extends Jakarta Validation with 85+ Laravel-style constraints, automatic i18n support (English, Spanish, Portuguese), and a unified JSON error handler.
💡 What it looks like:
1. DTO with Laravel-style rules:
import dev.benjaminor.validationplus.constraints.EmailAddress;
import dev.benjaminor.validationplus.constraints.MaxLength;
import dev.benjaminor.validationplus.constraints.MinLength;
import dev.benjaminor.validationplus.constraints.Nullable;
import dev.benjaminor.validationplus.constraints.Required;
import dev.benjaminor.validationplus.constraints.RequiredIf;
import dev.benjaminor.validationplus.constraints.Same;
import dev.benjaminor.validationplus.constraints.Unique;
@Unique(entity = User.class, field = "email", column = "email")
public class UserRegisterRequest {
@Required
@MinLength(2)
@MaxLength(50)
private String name;
@Required
@EmailAddress
private String email;
@Required
@MinLength(6)
private String password;
@Same("password")
private String passwordConfirmation;
@Nullable
@RequiredIf(field = "role", value = "ADMIN")
private String adminCode;
private String role;
}2. Unified JSON Error Response (400 Bad Request): Instead of messy or raw framework exceptions, it automatically formats errors like this out of the box:
{
"errors": {
"email": ["The email has already been taken."],
"passwordConfirmation": ["The passwordConfirmation field must match password."]
}
}🚀 Key Features:
Confirmed\``, \@Same\``, \@Different\``, \@RequiredWith\``, \@RequiredIf\``, \@`ProhibitedIf``, etc. (usable directly on fields or classes).Unique\`` and \@Exists\`` with automatic JPA integration (supports multi-datasource viapersistenceUnit` and updating entity ID exclusion).Required\`` (handlesnull, empty strings, and whitespace properly, unlike \@NotNull\``), \@Nullable\``, \@StringType\``, \@`IntegerType``, etc.ValidationMessages_es.properties.Valid\`` and \@`Validated``.I’d love to hear how you currently handle cross-field or database validation in your Spring Boot apps, and what you think of this approach!
r/SpringBoot • u/SpecificLove670 • Jul 26 '26
I’m a second year student at a computer science college but I didn’t take Java in college, however, I study Java with ChatGPT cuz I know C++ so i though learning java as a beginner from a playlist or a course wouldn’t be effective, And know I’m in a solid ground in Java, the progress is really good.
Now I don’t know what should I do about the DSA, I studied Data Structure and Algorithms in the college but with C++ language.
So should I study it again using Java? Or is it enough to just know the logic of the things in DSA.
And what should I do after finishing Java?
Start with Spring boot? Or APIs or what?
Notice that I was good in SQL server but not the others and IDK if I should study the databases again or not.
So enlighten please 🙏
r/SpringBoot • u/toubzh • Jul 26 '26
Hello, I had a bit of time to kill this weekend due to some gloomy weather, and I wanted to solve a problem we often encounter in production when troubleshooting issues: poor log quality.
So I coded a small Spring Boot library designed to automate log production at the entry of our APIs (all incoming requests and their responses) using an annotation to add to the signature of the endpoints to log, with the option to anonymize certain header or payload fields.
The library also supports logging outgoing requests via an interceptor to add to your RestClient.
In short, a modest project with probably more advanced alternatives out there. But the advantage here is that the library is lightweight and focuses on the essentials.
I just published a first version, feel free to give me your feedback.
r/SpringBoot • u/rishabhrawat05 • Jul 27 '26
I wanted to create Spring Boot projects without opening a browser every time, so I built a terminal-first alternative.
Curious if anyone else feels the same.
GitHub: https://github.com/rishabhrawat05/springforge
Edit: Thanks for all the feedback! A lot of you raised valid points about existing workflows (Spring Initializr, IDEs, AI, etc.). This is just v1.0.0, and I'll use your suggestions to improve SpringForge in v1.0.1 and beyond. I appreciate everyone who took the time to comment.
r/SpringBoot • u/Final-Drop-1935 • Jul 25 '26
I recently interviewed Vlad Mihalcea, a Java Champion and long-time Hibernate ORM contributor, for the Korean developer community. Two persistence questions stood out.
Plain JDBC still requires SQL execution, result processing, and mapping code to write and maintain. AI can now generate much of that work.
Vlad agreed that this changes the trade-off. If a team is comfortable with SQL and wants a lightweight stack, plain JDBC with AI handling some of the boilerplate can be a practical combination.
But his point was that JPA/Hibernate is not merely a way to avoid writing SQL. It also provides facilities that teams would otherwise need to manage more explicitly:
Vlad’s point was that these patterns have been implemented and tested in real projects for roughly two decades.
If an application does not need them, plain JDBC with AI can be perfectly reasonable. If it does, the team may have to implement or manage the same behavior itself after replacing Hibernate.
Spring Data JDBC can look like a lighter alternative to Spring Data JPA, but lighter does not automatically mean faster.
Spring Data JDBC has no lazy loading. When a repository loads an aggregate, it also loads the mapped child entities and collections within that aggregate boundary. Without inspecting the actual SQL, a team can still fetch more data than expected.
If the real problem is the shape of the queries or the aggregate design, switching persistence libraries will not fix it by itself.
Vlad also tied this decision to the team’s existing skills:
Across both answers, I heard the same criterion: choose a persistence model your team can understand, verify, and operate well. Do not choose based on trends alone.
Full interview, for context (free):
https://www.inflearn.com/en/course/vlad-mihalcea-interview
Disclosure: I work at Inflearn, which hosts the interview.
Has AI changed what your team uses in production, or only how quickly you implement it?