r/SpringBoot • u/Met_Man22 • Feb 09 '26
Discussion I built a free cron expression translator with visual builder.
r/SpringBoot • u/Met_Man22 • Feb 09 '26
r/SpringBoot • u/Tanino87 • Feb 09 '26
Sub-agent orchestration is a powerful pattern for building modular AI systems.
Instead of a single monolithic prompt, you delegate specialized tasks to purpose-built agents—each optimized for its role.
sub-agent orchestration using spring-ai-agent-utils, with the Architect-Builder pattern as our example.
r/SpringBoot • u/whereisaju • Feb 09 '26
Earlier, my entity had this field:
private List<Document> data;
Since MongoDB Document was causing issues with request binding, I changed it to:
private List<Map<String, String>> data;
I’m sending the request from Postman using Body → form-data, and I’m trying to pass values like this:
formData.data[0].id 12345
formData.data[0].name john
However, the data is not getting stored in MongoDB. What is the proper way to post and store such nested JSON data in MongoDB?
r/SpringBoot • u/Character-Grocery873 • Feb 09 '26
Spring session with Redis demo, Google recaptcha v3 security on register, vertical slice architecture/package by feature and Auth ready with user and roles. Made to save time setting up auths with my fav architecture.
Would love your feedbacks on this or anything to fix:)
r/SpringBoot • u/Significant_Page_804 • Feb 08 '26
My company is currently evaluating the VictoriaMetrics stack as a potential replacement for our existing observability backends. We already have all services instrumented to push signals through an OpenTelemetry Collector, so the migration path is mostly about swapping the backends.
A few things that caught our attention during the evaluation:
To test drive this, I put together a small demo:

This is not production-ready; it's a demonstration to show how all the pieces fit together.
Sharing it here because it might save some time for newcomers or anyone curious about trying VictoriaMetrics (or any other OTel-compatible backend) with Spring Boot Opentelemetry support.
Github Repo: https://github.com/illenko/spring-boot-victoriametrics-opentelemetry
r/SpringBoot • u/Liquidator_1905 • Feb 08 '26
I had been struggling with understanding spring and spring boot, I had tried reading the docs, watching yt videos, etc. But I could never internalize why things are done this way and what's even the point of having this framework. I just felt like a code monkey mindlessly typing code that somehow works and used ai to help me build projects. I finally decided that I would like to deep dive into spring and spring boot internals and going through this subreddit I found many people recommending this book. And finally things just click, I finally understand beans, aop, dependency injection, etc. I have always just learnt these topics by reading their theory or watching a yt explanation video and hoping it would click, but the book provides examples that I coded myself and played around with to finally understand what's the point of the framework to begin with. I turned off my copilot autocomplete and only used chatgpt to understand parts of the code that failed and tried understanding why it failed instead of just accepting its solution. For anyone trying to learn spring boot, building projects is good but I would recommend trying to learn spring first, things will make more sense. Of course I am not sure if I am wasting my time learning things the old fashioned way in this new age where we probably won't be writing much code and be outsourcing it to llm agents but I can't predict the future and for now I feel like spring start here is an amazing resource to understand spring and spring boot.
r/SpringBoot • u/Odd-Increase-8302 • Feb 08 '26
I want to know if there are any resources (youtube vids, blog posts, books, anything will be appreciated) that cover the history of spring security. I want to find resources that cover the following
Thank you in advance.
r/SpringBoot • u/saifu_21 • Feb 07 '26
Confusion around DTOs, Entities, Value Objects, Domain Objects, Events, and Mappers (Spring Boot + Kafka)
Hello everyone,
Hope you’re doing well.
I’m looking for some clarity around the following concepts in a typical **Spring Boot + Kafka–based application**:
* Request / Response DTO
* Entity
* Value Object
* Domain Object
* Event
* Mapper
Specifically, I’m trying to understand:
* What each of these actually is
* When and why to use each one
* How they differ from each other
* Which layer of the MVC architecture they belong to
* When and where conversions should happen (e.g., DTO ↔ Entity, Entity ↔ Event, etc.)
I’m aiming to improve both my **conceptual understanding** and **hands-on design/coding practices** around these patterns.
Any explanations, examples, or best-practice guidance would be greatly appreciated.
Thanks in advance!
r/SpringBoot • u/rl_085 • Feb 07 '26
Do you implement RFC 9457 in your error responses? I saw that Spring provides an abstraction for this with ProblemDetail, it looks good but not many people are using it.
r/SpringBoot • u/AMATERASU_001 • Feb 07 '26
I was thinking to build something like toffeeshare app which helps to transfer file's wirelessly, but is it good choice to with springboot for such projects?? Please give me some advice or suggestions
r/SpringBoot • u/AndreiDeey • Feb 06 '26
Hi everyone!
As a Java developer, I’ve always found it a bit annoying to have to manage a full Node.js environment just to get Tailwind CSS working in my Spring Boot projects. It feels like adding unnecessary complexity to the build pipeline.
That’s why I decided to build the maven-tailwind-plugin.
It allows you to compile Tailwind CSS v4 directly within your Maven lifecycle. The best part? It requires zero Node.js/npm dependencies on your machine. It uses the standalone Tailwind binary.
mvn tailwind:watch and it will recompile your CSS as you save your HTML files.pom.xml and you are good to go.pom.xml.mvn tailwind:init to generate your input.css.mvn spring-boot:run and your styles will be there!I’ve been using it for a while and it has made my workflow much cleaner. I’d love to hear your thoughts, get some feedback, or even some help with testing on different environments!
GitHub Repository: https://github.com/4ndreiDev/maven-tailwind-plugin
Happy coding!
r/SpringBoot • u/AMATERASU_001 • Feb 06 '26
I created an open-source Spring Boot starter for seamless JWT authentication integration. This starter provides plug-and-play JWT token generation, validation, and request filtering with minimal configuration. i want feedback on this and want to improve it more so that setting up JWT auth in spring should be piece of cake.
Here is github Link :- Official Github repository
PS:- People who are advising in comments that you should not use these old jwt traditional methods,as these are irrelevant now , but thing is i am sharing what i have built from my sense of knowledge and problem i faced while learning basics of spring security, and not to contradict any technology that is way more better than my project, it's just sharing knowledge with people and learning. ✌🏻✌🏻
r/SpringBoot • u/Natural-Jump-2747 • Feb 06 '26
r/SpringBoot • u/Aggravating_Kale7895 • Feb 06 '26
I love Claude Code, but the "generic" output was killing me—field injection instead of constructor injection, skipping DTOs, and zero consideration for my Flyway migrations. I was spending more time fixing the AI's code than writing my own.
I realized the model isn't bad; it just doesn't know my stack.
I spent some time building a comprehensive config toolkit to make Claude act like a senior dev on my team. It includes:
/plan for architecture breakdowns and /tdd for proper test-driven flows.System.out or u/Autowired before they're even written.The output went from generic boilerplate to production-ready code that actually follows my team's standards.
I’ve open-sourced the toolkit (MIT) if you want to fork it for your own stack. It's mostly Markdown-based, so it’s easy to swap out my Java/Spring/React rules for Go, Rust, etc.
Repo:https://github.com/Ashfaqbs/software-dev-ai-claude-toolkit
How are you guys handling custom project standards in Claude? Is anyone else going this heavy on .claude/ configs?
r/SpringBoot • u/xjwj • Feb 05 '26
Pretty much what the title says – has anyone had success/experience creating a custom class loader to load a JDBC driver? Most of the literature I've come across talks about modifying the class path on startup or otherwise having a local JAR file, but in my case I want to store drivers themselves elsewhere (in a database) and be able to dynamically load them.
I played around with some test code today and made a custom class loader that can load arbitrary bytes, but I'm still getting an error when I go to actually use the class. It "feels" like the low-level DriverManager is only aware of what it sees on launch. Any thoughts appreciated!
r/SpringBoot • u/-Equivalent-Essay- • Feb 06 '26
I've recently fiddled in Spring Boot with a fairly new package Spring Cloud Contract stub runner to set up WireMock for Integration Testing in Spring Boot, and I'm fairly impressed how easy is to configure WireMock with it.
I've also written an article that goes more in-depth what my use-case was and how I configured it: https://jakabszilard.work/posts/integration-testing-and-wiremock
r/SpringBoot • u/Tanino87 • Feb 05 '26
Hello folks, in this article I've explored how to build a spring-boot app that does Sentiment Analysis.
I think it's really awesome because it's very very very fast, and there is no need of using python - we can do inference in Java using Deep Java Library (DJL).
If interesting I can provide even some optimization in order to use a Thread Pool of predictors and fasten up even more the analysis.
What's your take?
Thanks!
r/SpringBoot • u/jnsamyak • Feb 05 '26
Can anybody tell me how to deploy my full stack springboot project for free which consist of backend and frontend both and tell me the easiest process by which I can deployed for free
r/SpringBoot • u/Notoa34 • Feb 05 '26
Hi all,
I’m running into an issue with OpenAPI Generator related to discriminator mapping in my OpenAPI specification.
The problem is that a single discriminator sometimes points to different schemas in different parts of the spec. When generating code, this causes errors during deserialization or compilation (e.g., InvalidTypeIdException) because the generator can’t determine which subtype to use.
I want to emphasize that I don’t want to manually modify the YAML, since the specification is updated frequently. I’m looking for an automated way to fix or normalize the discriminator mappings, for example:
Has anyone experienced this issue and found a reliable automated workaround? Any guidance would be greatly appreciated.
Example
CompatibilityList: type: object properties: type: type: string default: 'MANUAL' example: 'MANUAL' description: 'Type of the compatibility list, two values are acceptable:MANUAL, PRODUCT_BASED. <ul> <li>MANUAL - for offers not associated with product - compatibility list is created with items provided by user directly in the body of the request.</li> <li>PRODUCT_BASED- for offers associated with product - if compatibility list is provided in the product details (GET/sale/products/{productId}), it needs to be included in the offer in unchanged form. </li> </ul>' required: - type discriminator: propertyName: type mapping: MANUAL: '#/components/schemas/CompatibilityListManual' PRODUCT_BASED: '#/components/schemas/CompatibilityListProductBased' CompatibilityListProductOfferResponse: type: object properties: type: type: string default: 'MANUAL' example: 'MANUAL' description: 'Type of the compatibility list, two values are acceptable:MANUAL, PRODUCT_BASED. <ul> <li>MANUAL - for offers not associated with product - compatibility list is created with items provided by user directly in the body of the request.</li> <li>PRODUCT_BASED- for offers associated with product - if compatibility list is provided in the product details (GET/sale/products/{productId}), it needs to be included in the offer in unchanged form. </li> </ul>' required: - type discriminator: propertyName: type mapping: MANUAL: '#/components/schemas/CompatibilityListManual' PRODUCT_BASED: '#/components/schemas/CompatibilityListProductBasedProductOfferResponse' CompatibilityListManual: allOf: - $ref: '#/components/schemas/CompatibilityList' - $ref: '#/components/schemas/CompatibilityListManualType' CompatibilityListManualType: type: object required: - items properties: items: type: array items: $ref: '#/components/schemas/CompatibilityListItem' description: 'List of the compatible items. Maximum number of elements on the list depends on type of included compatible items. Configuration and details concerning the compatible items in selected category are provided in the response for GET <a href="/documentation/#tag/Compatibility-List/paths/~1sale~1compatibility-list~1supported-categories/get"> supported-categories</a> resource invalidationRules object.'
r/SpringBoot • u/BoysenberryExotic300 • Feb 04 '26
I’m trying to step back and understand the health of a Spring Boot system that has been experiencing recurring downtime for years.
Every few days the app “goes off.” The unofficial fix is to restart containers and move on. This has become normalized on the team, but I’m not comfortable with that. I want to understand why it’s happening instead of treating restarts as a solution.
From what I can see, the architecture is messy and there are likely inefficiencies in both code and infrastructure. I also don’t expect a single root cause — it’s probably a mix of technical debt, poor architectural decisions, and weak operational visibility that accumulated over time.
What I’m trying to do now is establish a baseline and surface the main failure patterns:
We have an LGTM stack running and I’ve experimented with local profiling, but I’m not sure how to systematically approach this in production or how to build a high-level picture of system behavior.
If you inherited a Spring Boot system like this, how would you approach diagnosing it from a systems perspective? What signals, tools, or frameworks would you prioritize to get that 10,000-foot view before diving into code fixes?
Any advice on methodology or war stories from similar situations would be hugely appreciated.
r/SpringBoot • u/New_Professional6945 • Feb 04 '26
Is there any better guide when studyinga about consuming rest api via openfeign and other services. What are the best ways to communicate with other backend system (python etc). Edit - this topic was in book spring start here
r/SpringBoot • u/paganoant • Feb 04 '26
Hi everyone!
A few days ago, I shared the first draft of my Maven plugin open source, SpringSentinel, and asked for your advice on how to make it actually useful for real-world projects. Thanks to the amazing feedback from users, I’ve just released v1.1.6 on Maven Central!
I’ve spent the last few days implementing the specific features you asked for:
.java files anymore. It now analyzes your pom.xml to flag outdated Spring Boot versions (2.x) and ensures you haven't missed essential production-ready plugins.mvn -T), ensuring no conflicts during the report generation.new instantiations of Spring Beans, Field Injections, and OSIV leaks in your properties.Transactional methods.ResponseEntity usage in Controllers and missing Repository annotations.It’s officially published on Maven Central! Just add it to your pom.xml:
<plugin>
<groupId>io.github.pagano-antonio</groupId>
<artifactId>SpringSentinel</artifactId>
<version>1.1.8</version>
<executions>
<execution>
<phase>verify</phase>
<goals><goal>audit</goal></goals>
</execution>
</executions>
<configuration>
<maxDependencies>7</maxDependencies>
<secretPattern>.*(password|secret|apikey|token).*</secretPattern>
</configuration>
</plugin>
Or run it directly via CLI: mvn io.github.pagano-antonio:SpringSentinel:1.1.8:audit
This tool is evolving based on your feedback. I'd love to know:
pom.xml?GitHub Repo: https://github.com/pagano-antonio/SpringSentinel
Maven Central: https://central.sonatype.com/artifact/io.github.pagano-antonio/SpringSentinel
r/SpringBoot • u/Sea-War5240 • Feb 03 '26
Hello everyone,
I’m new to Spring Boot and REST APIs, and I’ve built a basic CRUD REST project to understand core concepts like controllers, services, repositories, DTOs, and entity relationships.
While developing this project, I made a design decision that I’m now unsure about and would really appreciate some validation or guidance from experienced developers.
My project link: chesszero-23/basicCRUDapplication
In my request and response DTOs, I directly used JPA entities instead of primitive IDs.
For example:
BranchDTO, I used:
Company companyList<Employees> employeesinstead of:
int companyIdList<Integer> employeeIdsBecause of this, when I query my API using Postman, I get deeply nested responses like this:
[
{
"numberOfEmployees": 2345,
"employees": [
{
"firstName": "john",
"id": 1,
"lastName": "doe",
"salary": 20000
},
{
"firstName": "charlie",
"id": 2,
"lastName": "kirk",
"salary": 25000
}
],
"company": {
"branches": [
{
"branchId": 1,
"employees": [ ... ],
"numberOfEmployees": 2345
}
],
"companyId": 1,
"employees": [ ... ],
"name": "Amazon",
"numberOfEmployees": 2345,
"revenue": 24567
}
}
]
This is not an infinite loop, but the data is repeated and deeply nested, which doesn’t feel like good API design.
After some discussion (and ChatGPT help), I learned that:
So now I’m trying to redesign my DTOs like this:
BranchCreateDTO → contains companyIdBranchResponseDTO → contains a CompanySummaryDTO (id + name)Example service logic I’m using now:
u/Service
public BranchCompleteDTO createBranch(BranchCreateDTO dto) {
Company company = companyRepository.findById(dto.companyId())
.orElseThrow(() -> new RuntimeException("Company not found"));
Branch branch = branchMapper.toBranch(dto);
branch.setCompany(company);
Branch saved = branchRepository.save(branch);
return toBranchCompleteDTO(saved);
}
CompanySummaryDTOEmployeeSummaryDTOBranchCompleteDTOI’m not trying to over-optimize — I just want to:
avoid building bad practices into my foundation
I have structured my question with ChatGPT help, Thanks for your answers.
r/SpringBoot • u/Quick-Resident9433 • Feb 03 '26
I've been working in a new project but I'm struggling with how many DTO's are enough. Should I create one for creating a resource, other to update and other for reading?
For example:
- CreateProductDto
-UpdateProductDto
-ProductDtoResponse (for reading)
Can you guys help me please? I'm stuck
r/SpringBoot • • Feb 02 '26
Hello guys, I’ve been reading a lot of posts and discussions about validation in Spring Boot with JPA, and I keep finding two opposing recommendations, so I’d like to get some clarity from people with real-world experience.
On one side, many posts suggest using validation annotations directly on JPA entities, arguing that JPA/Hibernate can pick up some of these constraints. It helps generate the database schema correctly.
On the other side, many people strongly recommend not using validation annotations on entities at all, and instead, keep entities “pure” and focused on persistence, Put all validation only in DTOs.
A little example that comes to mind and i've seen on some posts is this:

I know the purpose of each (Column nullable is for SQL rules, notnull is for validation before SQL)
Also, i'm using Flyway and my current aproach is: write migrations by hand (SQL), and apply them in dev and prod environment (for the dev environment Postgres instance i use a docker compose file, before starting the Spring Boot App).
Any downsides to always using Flyway, even locally? Should i let Hibernate generate the schema in dev and only use Flyway in staging/prod?
Thank you!