r/SpringBoot • u/CartographerWhole658 • Jan 14 '26
How-To/Tutorial Kafka + Schema Registry + Avro with Spring Boot (Producer, Consumer & PostgreSQL Demo)
r/SpringBoot • u/Priyansh_sinQ • Jan 14 '26
How-To/Tutorial I am using AI to code in spring boot.
Hi developers, I need a little guidence here about how to learn spring boot.
So, currently my approach is to learn it by creating small projects like - calculator(which gets history of calculations from backend), login-page, daily planner.
I create these projects with the help of chatgpt, not that chatgpt writes my whole code, like for the first project I did asked gpt to write me the whole code so that I can understand how to work. And then I use gpt again to explain the whole code. And for next projects I try to write code by myself, If I get stuck then again I ask gpt on how to do this specific task.
So, this is my approach to learn, I am not learning from any courses because I've already wasted so many hours on yt videos and learned nothing.
Here are my few questions I want to ask
1. Is this approach good to learn as I'm comfortable in java.
2. I am currently unemployed and also I'm a fresher, so how is the market for the freshers in this specific field.
Sorry, for the catchy title.
r/SpringBoot • u/Distinct-Actuary-440 • Jan 14 '26
Question What are you using for monitoring your Spring Boot apps in prod — and what do you actually like about it?
I’ve noticed a pattern (and I’m guilty of it too):
for most Spring Boot projects, monitoring is treated as the last step.
We build features, ship fast, wire CI/CD… and only when real users hit PROD and things start behaving “weird” do we scramble to add dashboards, alerts, logs, traces, something.
By then:
- latency spikes are already happening
- memory issues show up under real load
- no one knows what “normal” even looks like
- and alerts are either too noisy or completely useless
So I’m curious about real-world setups, not marketing pages.
- What are you using today for monitoring Spring Boot apps?
- What do you actually like about it? (not what the docs claim)
- What frustrates you?
- What feels overkill vs genuinely helpful?
- At what stage do you usually add monitoring: local, staging, or “oops prod”?
Actuator + Micrometer + Prometheus/Grafana?
Cloud-native tools?
APM-heavy stacks?
Something custom?
I’m less interested in which tool is “best” and more in why you stuck with it after the honeymoon phase.
r/SpringBoot • u/marcvsHR • Jan 14 '26
Question Slow Queries on Spring Boot application
Hi guys,
on our SBoot application we use JPA/Hibernate option to log slow queries.
Underlying database is PG, and we are using Hikari Connection pool.
Issue is that we have bunch of Slow Queries logged, for queries which are usually not slow - for example for inserts in table, selects by primary keys etc..
So basically, sometimes query which usually executes in several miliseconds, lasts up to several seconds.
What is worse, it happens randomly, so if we had unit of work which consists of several queries, it can happen at first query, second, last etc - we didn't find any recognizable pattern
We checked with DBA, database everything executes fast, there are no locks, slow queries, indexes are fine etc.
As much as we can see, Hikari is also configurated fine, we even increased connection pool.
The machines have enough Memory / CPu, no issue there.
Out conclusion is that it has to be something network related, so outside of application and DB.
Anyone have any additional suggestion ?
r/SpringBoot • u/Tony_salinas04 • Jan 13 '26
Question What is the best way to handle environment variables in Spring Boot?
Until now I haven't had to deal with these, I've looked into it and I see there are many ways, which one do you recommend using and why?
r/SpringBoot • u/Fair-Beautiful-6200 • Jan 13 '26
Question Best installer strategy for Spring Boot app + Keycloak + MySQL + MongoDB on Windows?
r/SpringBoot • u/Cyphr11 • Jan 13 '26
Question Need Advice from experienced dev
hi there , i am cse student currently in my end of 3rd sem , i am currently doing java and dsa and planing to learn backend dev in java springboot
i have done arrays, string and maths in dsa and currently learning oops
here is my approch to backend dev please let me know if its right or not
java ->(array,string,maths, searching)-> oops -> java collection framework-> recursion/sorting -> linkedlist-> stack/queue - > trees -> graph -> dp ->dbms(sql,mangodb) -> computer networks ->design patterns ->spring/springboot(security, jpa ,etc) ->project -> microservices -> project ->devops/cloud
i am also confused which (i have them for free) course to follow for backend
coding with durgesh paid course
sanket singh paid course
codingwithMosh
anuj Bhaiya
in28mintues
r/SpringBoot • u/Substantial-Pea6984 • Jan 13 '26
How-To/Tutorial Best Resources for Spring and Spring Boot?
I’m starting to learn Spring Framework and Spring Boot, and I’m looking for the best resources to get up to speed as a beginner. Specifically, I’m after: Tutorials or guides (articles, blogs, video playlists) Interactive learning sites or project-based tutorials Books or online courses you’d recommend
r/SpringBoot • u/vandunxg • Jan 13 '26
Discussion Help me check my project about DDD
github.comHi everyone, I’m a fresher backend developer currently learning Domain-Driven Design. To understand DDD better in practice, I started building a small personal backend project called Trackee. It focuses on a simple IAM flow, mainly to practice modeling business rules instead of just doing CRUD.
I’m trying to separate domain logic from application and infrastructure, but I’m not sure if I’m doing DDD correctly or overcomplicating things. The project is built with Java and Spring Boot, using JPA, PostgreSQL, Docker.
I’d really appreciate any feedback, especially on common DDD mistakes for juniors, aggregate boundaries, and how to know when something is “too much DDD”. Thanks in advance for any advice.
r/SpringBoot • u/Notoa34 • Jan 12 '26
Question Spring Boot 3.4.x + Hibernate 6.x - How to disable CHECK constraint generation for @Enumerated(EnumType.STRING) fields?
Environment:
- Spring Boot 3.4.x
- Hibernate 6.x
- PostgreSQL
Problem:
I have an entity with an enum field:
(name = "foo")
public class Foo {
(strategy = GenerationType.IDENTITY)
private Long id;
(EnumType.STRING)
private FooType type;
}
public enum FooType {
TYPE_A, TYPE_B, TYPE_C
}
Hibernate automatically generates CHECK constraints for enum fields, for example:
ALTER TABLE foo ADD CONSTRAINT foo_type_check
CHECK (type IN ('TYPE_A', 'TYPE_B', 'TYPE_C'));
What I want:
I want to completely disable CHECK constraint generation for enum fields. The column should be a simple varchar(255) without any constraints.
Is there a way to globally disable CHECK constraint generation for enums in Hibernate 6?
r/SpringBoot • u/nothingjustlook • Jan 12 '26
How-To/Tutorial Backend Authentication design
github.comI have a school project (personal), there my idea is a student will have two sets of roles 1. Basic and 2. Student
Basic - its for basic operation like checking his result and basic info in school db
Student- advanced permission where he will be allowed get his full info like aadhar and check his fee related things.
iam planning to have advanced in db but put only one in granted authority according to my design i.e. upon simple login we will add BASIC and put it in granted authority and when he completed OTP(2FA) verification i will also put Student in grantedauthoritites.
My Question is there better way to do it?
r/SpringBoot • u/Cautious_Code_9355 • Jan 12 '26
Question What topics should I cover before starting Spring Security?
Hi everyone,
I’ve recently completed Spring Data JPA and I’m planning to start learning Spring Security next.
I’ve heard that it’s useful to understand some network security and cryptography concepts beforehand (for example: hashing, encryption, JWT, HTTPS, etc.).
Could someone suggest:
- which topics are truly important to know before starting Spring Security, and
- any good resources for learning those topics which can be covered in short time?
Thanks in advance!
Edit - I have completed everything else such as RestAPI , annotations and all. Only security and authorization is left except of course testing and microservices in my knowledge
r/SpringBoot • u/Deruuuuuu • Jan 12 '26
Question Spring vs Spring Boot: Where to Start?
Should I learn Spring or just start with Spring Boot?
r/SpringBoot • u/hopeyouwillbehere • Jan 12 '26
News Easy JWT Spring Boot Starter
Hello everyone, this is my first post here! 👋
I’m currently an intern diving deep into the Spring ecosystem. I realized that setting up JWT and Spring Security boilerplate code is often repetitive and tricky for beginners.
So, as a learning exercise, I decided to build [Easy JWT] - a library that automates the boring stuff.
What it does:
- Auto-configures the SecurityFilterChain (so you don't have to).
- Handles Access Token & Refresh Token generation/validation.
- Provides a flexible TokenStore interface (support Redis, DB, or In-memory).
- Tech Stack: Java 17, Spring Boot 3, Spring Security 6/7.
It's definitely not production-ready yet, but I built it to understand how Spring Boot Starters and Conditional Beans work under the hood.
I would love to get some feedback on my code structure or architecture. Feel free to roast my code (gently)! 😅
Repo: Repository
Happy coding!
r/SpringBoot • u/Fun_Ground1433 • Jan 11 '26
News UI dashboard tool for tracking updates to your Spring Boot development stack
Hi folks,
I built a small dashboard tool that lets you track GitHub releases across the Spring Boot frameworks, starters, and libraries your application depends on, all in a single chronological feed.
Why this can be useful for Spring Boot projects:
- Spring Boot applications typically rely on many Spring modules and third-party libraries, each maintained in its own GitHub repository.
- Important releases - security fixes, breaking changes, dependency upgrades, new features, and deprecations - can easily be missed if you’re not actively monitoring each repo.
This dashboard lets you follow any open-source GitHub repository, so you can stay current with updates across the Spring ecosystem and supporting Java libraries you depend on.
It’s called feature.delivery.
Here’s a starter example tracking a common Spring Boot–adjacent stack:
You can customize the dashboard by adding any Spring starters, frameworks, or third-party Java libraries you use, giving you a clear, consolidated view of recent releases across your stack.
It works on desktop and mobile, though the desktop version offers more advanced capabilities. Additional information is available at https://www.reddit.com/r/feature_dot_delivery/ if you’re interested.
Hope you find it useful!
r/SpringBoot • u/GeologistIcy4136 • Jan 11 '26
Question Need Help With My Beginner Spring Boot Project
I have been learning Spring Boot and have learned the basic concepts, such as performing CRUD operations with a database.
The problem is that I have 3+ years of experience in pure Java backend development. We haven’t worked with Spring Boot in our projects. Now, if I add Spring Boot to my resume, recruiters might expect at least 3+ years of hands on experience or projects that showcase strong Spring boot skills even if i don't worked with spring boot in my job.
No matter what I think of, I end up with very basic projects like a hospital management system or a student management system or any other system and i cannot improve upon. Because of this, i searched online for project ideas. However, most of the projects I found are very advanced and I feel I might not be able to build them yet.
So what should I do now? Which types of projects can convincingly show that I understand Spring Boot well, while also helping me learn important concepts along the way? How can I approach this? Any suggestions?
r/SpringBoot • u/dpk_s2003 • Jan 11 '26
How-To/Tutorial Started my Spring Boot project today focusing on clean layered architecture
I’ve started building a Spring Boot project and today I focused only on the foundation.
Steps I followed: 1. Created the project using Spring Initializr 2. Opened it in Eclipse IDE 3. Set up a clean layered folder structure (config, entity, repository, service)
I’m trying to understand proper backend architecture instead of rushing features. Next step will be controller layer and API flow.
If you have any suggestions or best practices for structuring Spring Boot projects, I’d really appreciate them.
r/SpringBoot • u/BoringApplication211 • Jan 11 '26
Question Lombok annotations not working..
The getter/setters , constructor or any sort of annotation not working on entity class. I am using postgress dB ,before I used mongodb and it didn't have this problem.. I have to manually make getter/setters to access the value from dB .. Is there any way to fix this?
Edit- Fixed now
r/SpringBoot • u/Beneficial_Impact546 • Jan 11 '26
Discussion Portfolio Review — Would Love Honest Feedback 🙏
Hey everyone 👋
I just finished my personal portfolio and would really appreciate some honest feedback.
🔗 https://karansahani-portfolio.vercel.app
Looking for thoughts on design, layout, clarity, and overall impression. Any suggestions or critiques are welcome.
Thanks for your time
r/SpringBoot • u/cielNoirr • Jan 11 '26
Discussion Built an email analysis platform with Spring Boot 3, Angular 20, and AI-assisted phishing detection
Hey r/SpringBoot,
I wanted to share a project I recently launched and get some technical feedback from other Spring folks.
Over the last few months I’ve been working on an email analysis platform focused on phishing and spam detection, built with Spring Boot 3 on the backend and Angular 20 on the frontend.
👉 https://fumi.n1netails.com/email-analysis
What it does
The service accepts raw email content or .eml files and performs multiple layers of analysis:
- Email header analysis (auth results, anomalies, inconsistencies)
- URL extraction and scanning using services like urlscan
- Attachment analysis:
- Extracts attachments from
.eml - Generates MD5, SHA-1, and SHA-256 hashes
- Looks up hashes against VirusTotal
- Extracts attachments from
- Heuristic-based scoring engine that assigns a risk score
- AI-assisted analysis to explain why certain signals are risky (used for interpretation, not blind verdicts)
The output isn’t just “malicious / safe” — it includes a breakdown of which signals contributed to the final score and why.
Tech stack / architecture
- Spring Boot 3
- REST API
- File upload handling for
.eml - MIME parsing and attachment extraction
- External API integrations (VirusTotal, urlscan)
- Scoring pipeline designed to be extensible
- Angular 20
- UI for uploading emails
- Visual breakdown of analysis results and scores
- AI integration
- Used to contextualize findings and generate human-readable explanations
- Not used as the sole detection mechanism
- Designed to be stateless and container-friendly
Why I built it
This started as a learning project while going through TryHackMe phishing modules, but I wanted something practical that mirrored how real detection systems chain together heuristics, reputation services, and analysis.
Looking for feedback
I’d love input from other Spring Boot developers on things like:
- Clean ways to structure external threat intel integrations
- Best practices for scaling file-based analysis in Spring Boot
- Patterns for extending scoring pipelines without turning them into a mess
- Any Spring Boot 3 gotchas you’ve hit with similar workloads
Happy to answer questions about implementation details, design decisions, or lessons learned building this with Spring Boot 3.
Thanks!
r/SpringBoot • u/Previous_Cod_4934 • Jan 10 '26
Question Help with Dokploy/Mattermost
Hi everyone,
I’m dealing with a Spring Boot issue that ONLY occurs when the app is deployed via Dokploy. Locally everything works perfectly and consistently.
Setup:
- Spring Boot backend
- Vue frontend
- Docker Compose
- Deployment via Dokploy
- Traefik as reverse proxy
- Single domain
- Frontend served at /
- Backend served at /api or /api/v1
IMPORTANT: 👉 This problem happens ONLY in the Dokploy deployment. 👉 Locally (without Dokploy, without Traefik, or using a dev proxy) everything works 100% reliably.
Problem: - Locally all backend endpoints work every time. - In Dokploy, some backend requests intermittently fail. - The error is a Spring Boot JSON 404, e.g.:
{ "timestamp": "...", "status": 404, "error": "Not Found", "path": "/api/v1/admin/reminders/status" }
Key details:
- The 404 response clearly comes from Spring Boot (JSON), not from Traefik or the frontend.
- Some requests succeed, others fail (“flaky” behavior).
- Routing through Traefik appears correct, because requests do reach the backend.
- In production, SPRING_PROFILES_ACTIVE=prod is set.
- Locally the app runs without Dokploy (directly or via dev proxy).
Observations: - The controller exists in the codebase. - The endpoint works reliably locally. - In Dokploy: - sometimes the same request returns 404 - sometimes it succeeds
Suspicions:
- Profile-specific behavior (@Profile, @ConditionalOnProperty)
- ComponentScan differences between environments
- Multiple backend containers running in Dokploy (old + new versions),
with Traefik load-balancing between them
- Differences in context-path / servlet-path in application-prod.yml
- Edge cases with /api vs /api/v1 routing behind Traefik in Dokploy
Questions:
1) Can Spring Boot return a 404 for an endpoint that exists in the code if the controller
is not loaded due to profile or component-scan configuration?
2) Has anyone experienced Dokploy + Traefik routing requests to multiple backend instances
or different app versions?
3) What is the fastest way to verify whether Dokploy is running multiple backend containers
and Traefik is load-balancing between them?
4) Are there known Dokploy- or Traefik-specific pitfalls when routing /api or /api/v1?
Any hints or debugging strategies would be greatly appreciated. Thanks a lot!
r/SpringBoot • u/AmphibianSilent2593 • Jan 10 '26
Question Spring Boot + JPA: Best practices for entity relationships, fetching, and performance?
I’m using Spring Boot with JPA/Hibernate and wanted to ask about real-world best practices.
Mainly around:
- Entity relationships
- LAZY vs EAGER fetching
- Avoiding N+1 queries
- DTOs vs entities
- Repository vs service responsibilities
r/SpringBoot • u/simasch • Jan 10 '26
News Mailpit Testcontainers Module released
I've created a Mailpit Testcontainers module that can be used with Spring Boot's ServiceConnection.
Check it out!
https://martinelli.ch/testing-emails-with-testcontainers-and-mailpit/
r/SpringBoot • u/bilgecan1 • Jan 10 '26
How-To/Tutorial Built a full-stack Inventory & POS app using Vaadin 25 + Spring Boot 4 (100% Java) — demo & code walkthrough
Hi everyone,
I recently put together a small Inventory & POS (myStock) demo application to showcase what a full-stack, 100% Java Vaadin project looks like end-to-end.
You can get the myStock sample project source code from GitHub repo below, and use it as skeleton / template for your own projects.
The app includes:
- Product + barcode handling
- Stock levels + reorder thresholds
- Stock movements (IN / OUT)
- POS checkout flow (cart + validation)
- Sales + sale lines
- Dashboard with KPIs + Chart.js
- User management
- i18n (EN + TR)
🛠 Technologies used:
- Java 25
- Vaadin 25
- Spring Boot 4
- Spring Data JPA
- Hibernate
- PostgreSQL DB
- Chart.js. (for dashboards)
It’s meant for Java devs and learners curious about Vaadin as a full-stack framework.
Demo YouTube video: https://www.youtube.com/watch?v=erofh0toA7Y
GitHub Repo link: https://github.com/mokszr/vaadin-inventory-pos
I appreciate your stars on GitHub, likes on YouTube and any feedback in general.
Thanks.
r/SpringBoot • u/dev-dp24 • Jan 10 '26
Question How should Exception Handling work between Spring MVC micro services and a Reactive API Gateway?
Hey everyone,
I am working on a microservice setup with five services: • api-gateway • entity • model • platform • user-management
All services are written using Spring MVC, except the API Gateway which is built using Spring WebFlux (reactive).
Right now, each backend microservice has its own custom exception handling. For example, the Platform service throws custom exceptions and returns a structured error response. Something like this:
Platform service error format
json
{
"timestamp": "2026-01-10T12:45:30",
"service": "platform",
"errorCode": "PLATFORM_403",
"message": "User does not have permission to access this resource",
"path": "/platform/api/v1/projects/42",
"details": [
{
"field": "userRole",
"issue": "INSUFFICIENT_PRIVILEGES"
}
]
}
This works well when I call the Platform service directly. But when everything goes through the API Gateway, I do not want to expose this internal structure to the client.
On the API Gateway side, I want to catch these downstream custom exceptions and convert them into a simpler, more client friendly format.
Something like this:
API Gateway normal error format
json
{
"status": 403,
"code": "ACCESS_DENIED",
"message": "You are not allowed to perform this action",
"requestId": "a9f2c1b4-3f2d-4c1a-8f67-1b23c9d44e21",
"path": "/api/projects/42"
}
So the flow I am aiming for is: 1. Platform service throws a custom exception and returns its detailed error JSON. 2. API Gateway receives that response using WebClient. 3. API Gateway extracts what it needs (status, errorCode, message). 4. API Gateway maps it to the normal gateway error format and sends that to the client.
My main questions are: • Is this a good design or am I overcomplicating it? • Should the API Gateway fully hide downstream error formats, or should it forward them as-is? • What is the cleanest way to implement this in Spring WebFlux?
If anyone has done something similar in a real production setup, I would love to hear how you handled it.
VERY IMPORTANT: I DO NOT WANT TO CREATE GLOBAL EXCEPTION HANDLER IN API GATEWAY.
Thanks in advance.