r/SpringBoot • u/PuddingAutomatic5617 • Apr 16 '26
Discussion GraphQL N+1 Problem Solved (4.1s → 546ms) | Dynamic Batching Demo
r/SpringBoot • u/PuddingAutomatic5617 • Apr 16 '26
r/SpringBoot • u/Virtual-Associate877 • Apr 15 '26
I'm a beginner trying to learn springboot, It looks too difficult and I feel lost seeing endless documentation but mainly what I feel is I don't understand how anything works and that's why I'm lost
I'm reading spring starts here but it feels too slow
Trying to find a job asap is causing more pressure
What should I do?
r/SpringBoot • u/pedoooo0 • Apr 15 '26
@Transactional in Spring Framework starts a DB transaction and holds a connection from the pool until the method ends.
If you mix DB work with slow tasks (API calls, file processing), that connection stays locked and idle.
Under load, this leads to connection pool exhaustion and blocked threads.
Long transactions can also hold locks, slowing down other queries.
Keep transactions short and focused only on DB writes.
Move external calls and heavy logic outside the transactional boundary.
r/SpringBoot • u/Austere_187 • Apr 15 '26
I've built a remote MCP server in production (Spring Boot + OAuth 2.0 + PKCE + RFC 8414 discovery + tool access control) and I'm thinking of open sourcing it as a starter template.
Everything I've found is either Node.js, Python, or only covers the basic stdio transport with no auth. Is this something Java devs are actually struggling with? Would a Spring Boot starter with auth baked in be useful to you?
Open to feedback and suggestions.
r/SpringBoot • u/Alert_Ad4540 • Apr 15 '26
Hey everyone, working on a side project and wanted to share it and get some honest feedback.
Every time I debugged production logs I kept scanning hundreds of lines, recognizing the same error patterns, Googling the same stack traces over and over. So I built StackLens to automate that first step.
You point it at a log file or paste a stack trace and it tells you:
- What the problem is
- Why it happens
- How to fix it
It detects 8 common failure types out of the box: NPEs, DB connection failures, OOM errors, timeouts, auth errors (including JWT expired), thread pool exhaustion, and HTTP 500s.
Everything runs offline, no API calls, nothing leaves your machine. Supports human-readable and JSON output so it works in CI pipelines too.
GitHub: https://github.com/AbaSheger/stacklens
Happy to hear feedback, especially on which error types to add next.
r/SpringBoot • u/leetjourney • Apr 14 '26
After 4 months, the Spring Boot 4 microservices project has come to an end.
In this video I build a Home Energy Tracker with multiple components talking to each other.
Here is a link to the complete course:
Here are some of the main topics covered:
- Rest Api
- System Design
- Oauth2 and JWT with Keycloak
- Kafka
- Timeseries DB
- JPA/Hibernate
- Flyway
- Observability (Prometheus/Garafana)
- Spring AI
- Email sending from SB app
- Migration to Spring Boot 4
- Testcontainers
- OpenApi / Swagger
- Aspects
- Circuit Breaker
- Api Gateway
People found my previous course useful, I hope at least someone will find this a good addition to their portfolio.
The whole project is also on github and split into sections (link in video description). Any feedback appreciated.
r/SpringBoot • u/Prestigious-Bee2093 • Apr 14 '26
Hey everyone,
Fullstack dev here. If you're building REST APIs with Spring Boot, you're probably already using springdoc-openapi or Swagger to document your endpoints. But when it comes to actually using that API - whether for internal tools, admin panels, or giving your API consumers a UI, you're stuck rebuilding the same CRUD tables and forms over and over.
I built something to solve that.
UIGen — point it at your OpenAPI spec (the one Spring Boot already generates), and get a fully interactive React frontend in seconds.
npx @uigen-dev/cli serve ./openapi.yaml
# UI is live at http://localhost:4400Spring Boot + OpenAPI is already a killer combo for API-first development. But there's a gap: you document your API beautifully, but you still need to build a frontend to actually use it. UIGen closes that gap:
@Valid annotations, Spring Security rules, and business logic.It parses your OpenAPI spec and converts it into an Intermediate Representation (IR) — a typed description of your resources, operations, schemas, auth, and relationships. A pre-built React SPA reads that IR and renders the appropriate views. The CLI serves the SPA and proxies API calls to your real Spring Boot backend, handling CORS and Auth injection automatically.
@RestController endpoints.POST /orders/{id}/ship).$refs may degrade gracefully rather than resolving perfectly.GET /resource/{id} endpoint.If you use springdoc-openapi, just grab your spec and run:
# Get your spec (usually at /v3/api-docs)
curl http://localhost:8080/v3/api-docs > openapi.json
# Generate the UI
npx @uigen-dev/cli serve ./openapi.json --proxy-base http://localhost:8080Or try it in one of the example yamls in the repo Customizations in the form of spec annotations and a JSON file coming soon
Would love to hear thoughts from the community. This isn't meant to replace a custom consumer-facing frontend, but for internal tools, rapid prototyping, or providing a UI for your API consumers, it's a massive time-saver.
Happy coding!
r/SpringBoot • u/Huge_Road_9223 • Apr 13 '26
Hey folks, I am a long time SpringBoot Developer with Java 21. I have long been able to create robust SpringBoot apps and run them in Docker.
I also have Kafka running in Docker, and I have MySQL running in Docker as well.
I am a newbie to KeyCloak, I have heard of it, and NEVER knew what it was until recently. As far as I can see, and correct me if I am wrong, but essentially it is a User/Roles management tool by itself. You can this as an Oauth2 system to authenticate users, and get their roles passed back in a Java Web Token (JWT).
In the past, I have used either GitHub, Google, FaceBook, and Auth0 to be sources of authentication. Auth0, although now owned by Okta, was still free for most people to use, provided you had under a certain amount of users. So, several projects used Auth0.
I guess KeyCloak can be it's own service where new users can be created and maintained with a secure password. In the same way MariaDB is the open-source version, KeyCloak seems like a free and open-source version of some Authorization service like Auth0/Okta. I hope I am getting this right.
So, here is the thing:
I am not a docker expert, I have been using it, but not lately and so I am a little rusty. I did remember that my 1) backend springboot app 2) mysql 3) Kafka and 4) UI app all have their own docker containers, and ALL share the same network in docker. This allows my backend to see both kafka abd the database.
So, I was surprised to see Keycloak configured to run on port 8080, I might change it to something else. Or is it only the UI for Keycloak that is running on port 8080.
I appreciate any help as I would like to take some of my older apps and configure them to use KeyCloak as another Users/Roles Servince instead of Auth0. Thanks!
r/SpringBoot • u/Interesting_Path7540 • Apr 14 '26
New post in my Spring AI 2 series! This time: a first step into RAG. This chapter covers ETL - how to index your data for LLM retrieval.
r/SpringBoot • u/Brilliant_You_7603 • Apr 12 '26
I'm starting with Spring Boot, and I come from a Node.js environment. I usually use Better Auth for authentication. What would be the most recommended option for Spring Boot? I've read some articles about it, and many cite Keycloak.
r/SpringBoot • u/rajpushp • Apr 12 '26
please help me with some good resources and course to learn spring boot in a structured way. And what's your thought on the course by coding shuttle spring boot 0 to 100.
r/SpringBoot • u/Status_Camel2859 • Apr 12 '26
Code 1:
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
return http
.csrf(csrf -> csrf.disable())
.securityMatcher("/todos/**")
.authorizeHttpRequests(auth -> auth
.anyRequest().authenticated()
)
.formLogin(Customizer.withDefaults())
.build();
}Code 2:
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
return http
.csrf(csrf -> csrf.disable())
.securityMatchers(matchers -> matchers
.requestMatchers("/todos/**", "/login")
)
.authorizeHttpRequests(auth -> auth
.anyRequest().authenticated()
)
.formLogin(Customizer.withDefaults())
.build();
}Code 3:
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
return http
.csrf(csrf -> csrf.disable())
.authorizeHttpRequests(auth -> auth
.anyRequest().authenticated()
)
.formLogin(Customizer.withDefaults())
.build();
}Code 3 does the job of protecting any request as expected. But Code 1 gives a 404 when it redirects to login page. Code 2 redirects and gives no error, but i get a basic html login page that looks different.
As far as I understand, I know we can simply define the above rule inside the authorizeHttpRequests. But I have seen multiple filters using the 1st pattern (code 1) and from a learning pov, I wanna understand what I'm lacking and how to fix it, i.e. use of separate security filters.
r/SpringBoot • u/Far_Protection_7573 • Apr 12 '26
Hi everyone,
I’m a final-year engineering student preparing for backend roles. I’ve built a Task Manager REST API using Spring Boot that includes CRUD operations, BCrypt password hashing, JWT authentication with refresh tokens, along with role-based access control and pagination.
I wanted to ask if this is strong enough to include in a fresher resume, or if I should still add more advanced features to make it stand out more in interviews.
Would really appreciate your suggestions!
r/SpringBoot • u/ZaneIsOp • Apr 12 '26
Hi everyone. For the last 4ish months I have been learning springboot in my free time, but I feel anxious sometimes. I enjoy reading books on the material (finished spring start here, and now reading spring security in action by the same author), but at what point do I reach the bar as a Jr? I prefer backend jobs for right now, but I am learning some JS -> TS -> then finally react.
My current knowlege is ok (maybe idk) here is what I can do:
I currently have two apps, the first being my most fleshed out
Employee Task Manager (I know daring isnt it)
Second app is just consuming an external API. I do fantasy football with friends and SleeperAPI have a public api for that. I actually already have a website made and deployed, but it was made in python/django, deployed with heroku so I want to remake it.
I know this still isnt enough, but what are some topics that a Jr must know or be helpful to know? I know this is immensly broad, just looking for suggestions. I dont even know at one point I even reach the bar to be a dev anymore :/.
r/SpringBoot • u/Sketusky • Apr 11 '26
Hi everyone,
I’m currently building my own service in Java (Spring Boot). I’ve got around 8 years of experience with Spring, but it has always been focused on REST APIs - I’ve never really written production grade frontend code.
I’ve played a bit with Thymeleaf as a hobby, but honestly I was never very satisfied with it. For this project, I decided to go with JTE since it integrates nicely with Spring Boot and lets me avoid diving into JavaScript/TypeScript, well actually to node world.
That said, I keep second-guessing this decision. I don’t really have a solid comparison point, and I’m wondering if I should try building the frontend with Angular instead (React is probably not for me).
This isn't a pet project, and the goal is to build it, deploy, do marketing. I'm really determined to deliver it. I also try to think long term but without experience it's tough decision to make.
So my question is: for a solo project like this - would you stick with JTE, or go with Angular?
Curious to hear your thoughts and experiences.
r/SpringBoot • u/Key_Use_4988 • Apr 11 '26
r/SpringBoot • u/AdMean5788 • Apr 11 '26
For context, I have used kafka in my project, now I want to deploy that project but I didn't find any free service of it for deployment.Also I want to know if the process is the same as local for deployment?
r/SpringBoot • u/JavaDev123 • Apr 10 '26
Hi everyone,
I have around 2 years of experience as a Java Developer, and I’m planning to build a Microservices-based project to enhance my practical knowledge and understanding of distributed systems.
I’m looking to design a project using:
If anyone has worked on a similar project or can share a GitHub repo, architecture ideas, or best practices, it would be really helpful for me to get started in the right direction.
Thanks in advance! 🙏
r/SpringBoot • u/PhilosophyProud4195 • Apr 10 '26
I want to connect with some experience developers right here ,as an Intern I am learning SpringBoot Microservices in depth from Concept and Coding Channel along with my internshio project on Microservices but right now what is the roadmap to be a modern day java dev thinking of buying Anuj Sharma course which include Ai jngegration wirh devops but price is too high for me , pleasee suggest some alternatives .
r/SpringBoot • u/Training_Hunt8430 • Apr 10 '26
Who we are??
We're a skill connection platform, where you build your proof of work and connect with people of your same skill peers.
Instead of searching solo for a role, you can search for job and grow with our community members.
Why should you join us??
We're not only just building connection with your skill peers but also enabling you to opportunities to connect with the recruiters and hiring managers and also know more about start ups and connections as well.
Enabling to find the right opportunity so you don't have to spend months building your network or connection.
Dm for link.
r/SpringBoot • u/No_Papaya_2442 • Apr 10 '26
I’m new springboot… currently I reached to Jwt token handling… and looking for project idea intermediate level where I can challenge my self
r/SpringBoot • u/JavaDev123 • Apr 09 '26
Hi everyone,
I’m a Java Developer with around 2 years of experience, mainly working with Java, Spring Boot, and REST APIs.
Recently, I started learning Apache Kafka, but I’m finding it quite difficult to understand concepts like producers, consumers, partitions, offsets, and real-time processing. I’m not able to connect the theory with practical use cases properly.
Could you please suggest some good resources (videos, courses, blogs, or docs) that are beginner-friendly but also helpful for interview preparation?
My goal is to at least get Kafka concepts clear enough to confidently answer interview questions.
Also, if you have any tips or a roadmap on how to approach Kafka as a Java developer, that would be really helpful.
Thanks in advance! 🙌
r/SpringBoot • u/BasketSlow890 • Apr 10 '26
r/SpringBoot • u/Isaac_Istomin • Apr 10 '26
In Spring Boot services, do you treat outbound HTTP clients as just normal app code inside each service, or more like infrastructure that should be standardised across teams?
I keep going back and forth. If every team rolls their own timeouts, retries, and logging filters, production gets messy fast. But if you centralise too much, people fight the defaults. Curious what others have found workable.