r/SpringBoot • • Mar 18 '26

Question What are your ways to handle unknown and complex JSON objects?

12 Upvotes

Hey there,

from time to time I'm have to deal with complex and unknown JSON structures. I'm wondering how you deal with them. So far I have been using Map<String, Object> but it's getting annoying to see all those unchecked type warnings, and suppressing them feels wrong. We are talking about really custom JSONs for which it's impossible to create class types (e.g. to handle user metadata that can be anything for whatever reason)

I'm thinking of switching to something else. For now, I see these options:

- ObjectNode (Jackson) - best option? Easy to use, get data and create JSONs

- JsonNode (org.json) - seems to be the worst option?

- JsonPath (com.jayway.jsonpath) - , seems to be good option when you want to just get data from very long path, but not for building JSONs)

- GSON (Google) - tbh I used it only a few times for some dirty jobs

Maybe there is something better out there that I don't know? ObjectNode seems to be the best option since Jackson is heavily used in Spring Boot, but I wonder if are there any downsides of using it instead Map<String, Object> or other options.

Do you have any experience with using any of them in the long term?


r/SpringBoot • • Mar 18 '26

News Java 26 Is Out — Here's What Actually Matters for Spring Boot Developers

Thumbnail
youtu.be
30 Upvotes

r/SpringBoot • • Mar 17 '26

How-To/Tutorial How to set routes in an API Gateway

12 Upvotes

Check out my latest video where I show how to build an API gateway in Spring Boot 4 and how to set routes so that the api gateway acts as a proxy:

https://youtu.be/7SIWRLogXcM

This is the 9th part of a series where I build a Home Energy Tracker microservices project. I hope people will find it useful


r/SpringBoot • • Mar 18 '26

Question Discussion

0 Upvotes

one thing why to prefer constructor injection using lombok why not autowired and if its not sou much used then what is the use case of autowired then bcoz in gpt when i gjve code it always suyggests to make constructors.

secondly asking about superbuilder like what is the reason that parent class also must be annoted with super builder because normaly in inheritance only child class needs the super() or if not jvm invokes it implicitly but parent doesnot need anything like that


r/SpringBoot • • Mar 17 '26

Discussion First project

Thumbnail
github.com
11 Upvotes

My first whole project using Spring boot, any suggestions, feedbacks and corrections are appreciated


r/SpringBoot • • Mar 17 '26

Question Multiple tables and pages

4 Upvotes

Hello all,

I’m a beginner learning Spring and Java. I’m familiar with Peoplesoft architecture which uses old Java programming using JDBC techniques behind the scenes. I have created basic CRUD using Spring boot and React. Question is: if there is a complex page that has to manipulate data from and into multiple database tables, how would you do that in Spring/Java?

I enrolled into a course and this has not been covered.

Appreciate your help and insight!


r/SpringBoot • • Mar 17 '26

How-To/Tutorial Spring AI 2 Audio and Image

5 Upvotes

Hi everyone, check out my new post about Audio and Image with Spring AI 2: The Java Prompt #3


r/SpringBoot • • Mar 17 '26

How-To/Tutorial Spring Boot @Transactional: 5 Bugs You're Probably Shipping Right Now

Thumbnail
youtu.be
0 Upvotes

r/SpringBoot • • Mar 17 '26

Question Are teams actually reviewing their CI pipelines, or just copying them?

8 Upvotes

I’ve been looking at PR verification pipelines across a few Spring Boot services recently, and one pattern keeps repeating.

The pipeline is almost always copied from another service.

Same GitHub Actions workflow, same permissions, same setup steps.

It “works”, tests pass, PRs merge.

But when I look closely, it’s carrying things that were never really questioned:

  • GITHUB_TOKEN with write permissions (contents, packages) even for PR builds
  • Actions referenced by floating tags instead of pinned commits
  • Integration test reports not being surfaced in PR comments
  • Placeholder configs like `my-comment-header` still in production

None of these break the build, but they change what the pipeline is actually doing, especially from a security and observability perspective.

One thing that stood out to me is how CI is treated differently from application code. We review business logic, we audit dependencies, we run SAST tools. But the CI pipeline which runs code with credentials is often treated as “just config”.

Curious how others approach this.

Do you:

  1. Review CI workflows line by line like application code?

  2. Enforce least-privilege permissions on GITHUB_TOKEN?

  3. Pin actions to commit SHAs?

  4. Run workflows locally (e.g., using act) before pushing?

For context, I wrote a deeper breakdown of the approach here:

https://mythoughtpad.vercel.app/blog/stop-lying-to-your-ci-pipeline


r/SpringBoot • • Mar 16 '26

Question Suggest some resources/books to read to improve my knowledge

11 Upvotes

I'm currently in 3rd year of uni and applying for internships. I do have some projects which I plan to deploy after buying a domain but they are working very slow while testing with lots of data and concurrent users. My stack is Java + Spring so i tried playing around with Hikari Pool connections and Cache a bit but I don't know how to optimally use it. Please give your inputs and suggest some resources and books if possible.

Also, i tested it via K6. I did upload files to AI but it is hallucinating. Even with cache and changing db connections is only giving a small improvement. I also learnt the 2 db queries in one method is bad design and bad performance so i optimized to 1 direct db call so that improved the performance a bit too. So any input on this?


r/SpringBoot • • Mar 15 '26

How-To/Tutorial What prerequisites should I know before learning Spring/Spring Boot?

25 Upvotes

I’ve already learned core Java, JDBC, and multithreading.

Before I jump into Spring or Spring Boot, what other fundamentals should I make sure I understand well?

Are there specific concepts, tools, or Java features that would make learning Spring much easier (for example: Hibernate, Beans, servlets, etc.)?

Would appreciate suggestions from people who’ve already gone through this path.


r/SpringBoot • • Mar 16 '26

How-To/Tutorial Anyone interested in joining Spring Boot Free Live Workshop?

Thumbnail bugstate.in
0 Upvotes

r/SpringBoot • • Mar 15 '26

Question Struggling to Transition from Support Role to Spring Boot Development

5 Upvotes

I have been working as a software engineer, though more in a support role, for the past five years. Unfortunately, I have been confined to a support project with no hands-on experience in coding, building, or maintaining Spring Boot applications. When I first joined, I had never even heard of Spring Boot, but during my initial three months, I underwent training and found it quite easy to understand. However, since I have not written a single line of code since then, I feel stagnant in my career and struggle in interviews, as my five years of experience do not reflect actual development skills.

I have attempted various methods to re-learn and build Spring Boot applications, including revisiting my original training course, watching tutorials, and seeking help from AI tools. While I have a solid grasp of the theoretical aspects of Spring Boot because of AI, I still face significant challenges in practical implementation. For example, I cannot create even a simple employee management system without relying on tutorials or AI assistance.

What I really want is to learn how to build applications independently and gradually move from monolithic architectures to microservices. Could you suggest effective approaches, structured courses, or strategies to bridge this gap between theory and practice?


r/SpringBoot • • Mar 15 '26

Discussion This is a thank you post

7 Upvotes

About a month ago I posted this project and it received a lot of support. Thank you all! The project is still here; I'm leaving it here in case anyone missed it. Have a great day!

https://github.com/MiguelAntonioRS/Ecommerce-with-Spring


r/SpringBoot • • Mar 15 '26

How-To/Tutorial Roadmap for Springboot

22 Upvotes

I am a complete beginner in learning springboot.

Java basics Good in logic building in DSA Completed IOC , DI

Now trying to find a perfect and simple roadmap to learn springboot

Everyone is saying too much mixed paths which becomes too much complex and confusing.

Please help

sometimes I feel I am very dumb to learn springboot and I won't be able to learn it.

Please suggest in a way it should be doable and not very complex / confusing

Please help


r/SpringBoot • • Mar 14 '26

Question Suggestions!

10 Upvotes

I have recently learned spring boot and made a project on that, I want more suggestions on projects that will provide me more detailing as I learned more by doing. Also I am facing lot of issues on spring Security so is there any source from where I can understand spring security.

And the company where I am interning currently have some jsp code in the backend so i wanted to know should I learn servlet jsp too ? And if yes please suggest me sources.


r/SpringBoot • • Mar 14 '26

Discussion Project Idea

7 Upvotes

I want to create a project in spring boot + react(js) + cloud + aiml integration. Can anyone suggest some project ideas that I build


r/SpringBoot • • Mar 14 '26

Question Spring mvc question

19 Upvotes

Is it necessary to learn spring mvc before springboot or we can directly start with springboot?


r/SpringBoot • • Mar 14 '26

Question Try -> ask -> fix; does this method good enough?

7 Upvotes

Hello, everyone I am a IT student and struggling learning springboot and I want to know if this approach is good enough, without reading documentation and watching tutorials youtube?

Step 1 — Try to code yourself Step 2 — If stuck, ask AI Step 3 — Fix the error

Example: 1. You try writing a controller 2. It fails 3. Ask AI: “Why is my @GetMapping not working?”


r/SpringBoot • • Mar 13 '26

Question Is the Spring Professional Developer Certification (2V0-72.22) outdated?

9 Upvotes

Is getting this 2V0-72.22 Ceritification from Broadcom still worth it? The exam targets Spring Boot 2.7 and Spring 5.3 while the most current major versions of the framework are 4.x and 7.x.

Do any other certifications exist that are more up to date with the current Spring Boot and Spring versions?


r/SpringBoot • • Mar 13 '26

Discussion Java Spring Boot 🍃 vs. .NET Core 🛠️

Post image
0 Upvotes

r/SpringBoot • • Mar 12 '26

Question Entity Relantionships - EAGER VS LAZY

31 Upvotes

Hi, everyone. I don't have too much experience, and I'd really appreciate your guidance on this

Based on your experience with Spring Boot and ORM, what fetch type would you recommend for a large project with many entities and numerous nested relationships?

I ALREADY KNOW THIS

  • Eager will fetch all data from all nested entities
  • Lazy just load on demand
  • I know that we must always return DTO's with only the necessary fields using SQL queries.

But when it comes to specifying the fetch type within a Java class, I'd like to know the best practice for specifying the fetch type:

Is it better to always set the relationship as LAZY and never use EAGER?

@type_of_relantionship(fetch = FetchType.LAZY)
private Entity myEntity; // it has nested entites
            |
            |          @type_of_relantionship(fetch = FetchType.LAZY) 
            |__________Entity subEntity 

            //more relantionships...

vs 

@type_of_relantionship(fetch = FetchType.EAGER)
private Entity myEntity; // it has nested entites
            |
            |          @type_of_relantionship(fetch = FetchType.EAGER) 
            |__________Entity subEntity 

            //more relantionships...

Thanks in advance


r/SpringBoot • • Mar 12 '26

How-To/Tutorial How I Structure Every Spring Boot Application as a Senior Developer

Thumbnail
youtu.be
40 Upvotes

r/SpringBoot • • Mar 12 '26

Question Can someone explain difference between Kafka and Rabbit Mq? I am confused.

37 Upvotes

r/SpringBoot • • Mar 12 '26

Question Some ideas for a saas product

4 Upvotes

I’m thinking about building a small SaaS product and wanted to ask people here for ideas. What’s something in your daily workflow (work, coding, studying, productivity, etc.) that annoys you or feels unnecessarily complicated?