r/SpringBoot • • Apr 20 '25

Question Where do you write frontend part for your java SpringBoot project?

32 Upvotes

Hello everyone i was wondering if you guys use eclipse or intelliJ to also write javascript or react? I use eclipse for example but i don't get auto complete or auto complete suggestions for js or html or css when doing frontend for my projects. Are there any extensions am missing or should be using?

For now i'm thinking of using Vs code for the frontend part and for creating backend rest api will stick with eclipse.

Please tell what you guys use.


r/SpringBoot • • Feb 07 '25

Guide RestClient vs. WebClient vs RestTemplate - Using the suitable library to call REST API in Spring ‌Boot

Thumbnail
medium.com
32 Upvotes

r/SpringBoot • • Sep 12 '24

10 Multithreading and Concurrency Best Practices for Experienced Java Developers

Thumbnail
javarevisited.blogspot.com
32 Upvotes

r/SpringBoot • • Feb 02 '24

is there any sample project which you refer to when you build a project from scratch?

32 Upvotes

r/SpringBoot • • Feb 15 '26

Question Looking for a study partner for Java Backend Development

31 Upvotes

I want to learn and practice:
• Core Java
• OOP concepts
• Collections
• Java 8
• Spring Boot
• Real-world projects

My goal is to become job-ready in the next 2 months, so I’m looking for someone who is serious, consistent, and ready to study daily. We can set daily targets, solve problems, discuss doubts, mock interview, and prepare for interviews together.

If anyone is interested please DM..


r/SpringBoot • • Feb 03 '26

Question Beginner Spring Boot CRUD project – confused about DTOs vs Entities and clean response design

31 Upvotes

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

What I did

In my request and response DTOs, I directly used JPA entities instead of primitive IDs.

For example:

  • In BranchDTO, I used:

    • Company company

    • List<Employees> employees

instead of:

  • int companyId

  • List<Integer> employeeIds

Because 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.

What I learned

After some discussion (and ChatGPT help), I learned that:

  • DTOs should not contain entities

  • DTOs should ideally contain primitive values or other DTOs

  • Relationships should be handled in the service layer, not the mapper

So now I’m trying to redesign my DTOs like this:

  • BranchCreateDTO → contains companyId

  • BranchResponseDTO → 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);
}

My confusion

  1. This approach feels much more verbose compared to directly using entities in DTOs.

  2. For read APIs (like “get all branches”), if I want to show company name, I end up creating:

    • CompanySummaryDTO

    • EmployeeSummaryDTO

    • BranchCompleteDTO

  3. This makes even a simple CRUD project feel over-engineered.

My questions

  1. Is this DTO-heavy approach actually the correct and recommended way, even for small projects?

  2. Is there a simpler or cleaner pattern for basic CRUD APIs that still follows good practices?

  3. At what point does it make sense to use:

    • DTOs

    • Or even returning entities directly?

  4. If possible, could you share a simple but well-structured CRUD Spring Boot project that I can refer to?

Goal

I’m not trying to over-optimize — I just want to:

  • learn correct habits early

  • understand why certain patterns are preferred

  • avoid building bad practices into my foundation

I have structured my question with ChatGPT help, Thanks for your answers.


r/SpringBoot • • Dec 04 '25

Question Should I learn Hibernate?

31 Upvotes

I recently started with Spring and Spring Boot, as i was going through Spring MVC I came across Spring Data JDBC, Spring Data JPA and there is something as Spring JDBC API (which does not come under Spring Data Project) and all this got me so confused. I know JDBC and that the JPA is a specification for ORMs and hibernate is one of most popular ORM out there. But now i am cant how should i go about all this, what to learn first, should I learn Spring Data JDBC first or Spring JDBC API or I should learn vanilla Hibernate first and then go with Spring Data JPA. So i need some guidance on this part and also if you can suggest some good resource which actually explains whats going on under-hood that would be great.


r/SpringBoot • • Nov 27 '25

Question Is n+1 issue in hibernate really bad or misunderstood?

31 Upvotes

I found this comment under stack overflow claiming that n+1 performance is really better than a casterian product of join, also api to db call time is really not that significant? that n+1 from calls to db feels faster than 1 single call to db from app?

https://stackoverflow.com/questions/97197/what-is-the-n1-selects-problem-in-orm-object-relational-mapping#comment9713570_97253


r/SpringBoot • • Oct 26 '25

How-To/Tutorial Creating an MCP Server using Spring AI is easier than you think...

31 Upvotes

MCP is one of the buzzwords of this year and with the new Spring AI release, it's easier than you think to build an MCP server.

I've put together an example where I show you how to first create an MCP Server on top of a data source and then use an MCP Host (Claude Desktop) to to fulfil request through the MCP Server created in Spring Boot

Link to the video:
https://youtu.be/3rtZRKM39BI

Hope you find it useful


r/SpringBoot • • Sep 22 '25

Question Resources to learn springboot

31 Upvotes

Hello guys, I joined an internship which requires me to use springboot to develop backend . But I have no prior experience in springboot . Do u guys have any suggestions for some courses that can help me learn it? Paid/free anything is fine


r/SpringBoot • • Jul 21 '25

How-To/Tutorial Jimmer ORM: A Lighter and More Powerful Alternative to Hibernate

Thumbnail
levelup.gitconnected.com
31 Upvotes

Ever since I started my career as a developer, I’ve always relied on JPA/Hibernate as the communication layer between my Java entities and the database. However, after years of experience and numerous real-world issues in enterprise applications, I’ve come to a crossroads.

If you’ve developed Java applications with JPA and Hibernate, you’ve likely faced these same challenges:

  • Complex mappings with OneToMany, ManyToMany, and bidirectional relationships

  • N+1 problems degrade performance in complex scenarios

  • “Dirty entities” mixing persistence logic with business logic

  • Difficulty building dynamic queries with the complex Criteria API

  • Bad performance if compared to no-ORM frameworks/libraries (e.g., JOOQ)

  • Proxy overhead causing LazyInitializationException

  • Deeply understanding the Hibernate life cycle

But what if I told you that, in my recent research, I stumbled upon an ORM framework that not only ensures the representation between our Java objects and our database model, but also promises to solve the following problems?

  • Eliminates N+1 by design

  • Keeps entities immutable and pure

  • Automatically generates optimized queries

  • ️ Offers a powerful DSL for dynamic queries

  • Great performance (almost as if we were writing SQL commands in the DBMS)

Meet Jimmer — a revolutionary ORM that redefines how we interact with databases in Java.


r/SpringBoot • • Jun 28 '25

Question What kind of original full-stack (Spring Boot + React) projects can I build for my resume as a fresher?

31 Upvotes

Hey everyone! I'm a fresher working on full-stack web development using Spring Boot (Java) for the backend and React for the frontend. I'm trying to build some solid projects for my resume, but I'm hoping to avoid the usual clones (like Todo apps, Netflix clones, etc.) since they feel a bit overdone and copy-paste-ish.

What kind of unique or impactful project ideas would actually help me stand out as a beginner with no work experience? Something that still teaches good practices (auth, CRUD, APIs, etc.) but shows creativity or problem-solving would be amazing.

Any advice, examples, or even challenges you recommend? Thanks a lot in advance! ✨


r/SpringBoot • • May 14 '25

Guide Spring practice projects

31 Upvotes

Hello everyone, 

This year I decided to invest some time in a personal project: a Java learning blog.

I created a serios of tutorials for mid learners based on all the feedback that i found on reddit, university and from some internships where I was trainer. 

The goal of these tutorials is to help you transition from simply knowing Java concepts to applying them in real projects through hands-on practice.

The main idea is to offer challenges and project ideas that help you practice different Spring topics. By the end, you'll have some portfolio-worthy content, practical experience, and more confidence for interviews.

The content is free, without ads or any account required. At the moment, im looking to receive some feedback from people to see if there are any improvements to be done. If you want, feel free to give it a try

Spring Projects ideas: https://explainjavalikeim8.com/spring-projects-ideas/

The roadmap: https://explainjavalikeim8.com/java-developer-roadmap-2025/

OOP Projects ideas: https://explainjavalikeim8.com/multi-layer-architecture-java-project-ideas/


r/SpringBoot • • Feb 08 '25

Question Spring Discord Server?

31 Upvotes

Is there a discord server to discuss and talk about spring? :)

Would be cool to chat with like minded devs all over the world


r/SpringBoot • • Dec 30 '24

Full Stack Web Application - Spring, Angular and MySQL

31 Upvotes

Hello guys,

Hope your are all good. I'm posting on reddit because i'm developing for a while a Full Stack Application, using Spring, Angular and MySQL.

The goal of this application, is to manage all the eletronic equipments of a company and track each equipment (history).

So, i'm also seeking for a job as a dev and i thought this could be a good idea to rich my portfolio experience, since i have none.

So the main goal of the application is:

- User

- Add User

- We can create a user assigning him to a department, location or neither

- Edit User

- Delete User

- View Equipments

- Assign user to an equipment or multiple equipments

- Equiment

- Add Equipment

- We can create a equipmentssigning him to a department, location or neither

- Edit Equipment

- Delete Equipment

- View User owner

- Assign an equipment to an user

This are the main features at the moment, of this application. Later i will do improvements such as:

- Add Spring Security (Implementation of JWT Authentication and Login)

- Add a dashboard for admin, shoqwing cards with stats or graphs (Equipments p/department, Total of Users, Users p/department, Equipment p/status, etc...)

- Implement a notification system, to alert the admin the equipments that are on use or returned from the warranty.

Please, i would love some feedback from you, and i don't mind if my code it's not the best but the logic is there. If u have any thoughts ply don't mind to ask.

All i need is your opinions, improvements, or something i might be doing wrong.

I'm excited to hear from you guys !

Here goes my git hub repo: https://github.com/programtiago/management-app

Wish you the best,

Tiago


r/SpringBoot • • Feb 17 '24

Easiest way yo deploy a spring boot app in production

31 Upvotes

Hi everyone,

I am new to web development. This is my first commercial project.

I am working on a startup idea that requires a landing page, an email capture page and a basic thank you page. Later one, I might add a blog and a selling page.

I am familiar with java for past experience with javafx desktop app. My reading suggested that Spring boot is the most popular framework for my need. I have coded the web app and it is working on my computer.

I want to deploy it online at minimal cost. I started reading about deployment and I realised that it is a whole new area of knowledge.

Any idea how I can go with this? What are the most popular and easiest solution for startups?

Thanks


r/SpringBoot • • Jul 26 '26

Question How to be a good spring boot backend developer

30 Upvotes

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 • • Jul 24 '26

Discussion Spring microservices

30 Upvotes

I just started learning microservices in spring and dont know anything. Like I know that message brokers are for asynchronous exchange of messages though services, but I wanted to see everything from scratch, so now Im doing a project without any message brokers, just synchronous http requests and after that, when I meet problems with this, I would transition to the RabbitMQ I guess. Any suggestions or resources to learn for beginners?


r/SpringBoot • • Jun 01 '26 Bravo

Question First time using Keycloak with Spring Boot — confused about JWT vs DB sync (need guidance + examples)

30 Upvotes

Hi everyone,

I’m a beginner working on my first project using Spring Boot + Keycloak, and I’m a bit confused about the correct architecture. Any suggestions, video links, or GitHub project examples would be really helpful

What I understand so far:

  • Keycloak handles authentication (login, registration, roles)

  • Spring Boot acts as a resource server and validates JWT tokens

  • My app has its own database for business logic (users, orders, etc.)

My confusion:

User data during registration
If a user registers in Keycloak, how should I handle extra fields like:

  • phone number

  • address

  • app-specific profile data

What I’m looking for:

Since this is my first time using Keycloak, any of the following would really help:

  • Best practice explanation

  • Real-world architecture examples

  • GitHub repos using Spring Boot + Keycloak properly

  • YouTube videos or tutorials that actually follow production patterns

Thanks in advance


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 12 '26

Question Entity Relantionships - EAGER VS LAZY

30 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 • • Nov 21 '25

Discussion Why I should migrate my project to Spring Boot 4 and why?

30 Upvotes

I'm a junior developer, not a strong programmer, but I wanted to start my own project using Spring Boot 3.5. I saw the news that the new version 4 was released. I don't know much about it, but should I upgrade to version 4, considering my project is already halfway through?

Sorry for my English, I just want opinion of senior and middle developers

Update Thank you guys for Replies, I enjoy it all. I still decided to stay for the 3rd spring, but it was interesting to read people's opinions.


r/SpringBoot • • Nov 12 '25

How-To/Tutorial Don't use H2 for learning. Go for any other db.

30 Upvotes

In memory DB is not a bad idea at all in and of itself, but as per latest changes the order in which db initialization works has changed, to the point that it is counter productive to actually invest time to learning the order of execution in which db is populated (is it hiber first , and then scripts? it is believed that configuring application.properties will solve the conflicts - it won't). I have wasted time figuring it out. However Postgres once populated worked like charm. So what is the point of having test DB which should sort of be easy to install is beyond my understanding. You've been warned, aight?


r/SpringBoot • • Sep 22 '25

Question Set<T> vs List<T> Questions

30 Upvotes

I see lots of examples online where the JPA annotations for OneToMany and ManyToMany are using Lists for class fields. Does this ever create database issues involving duplicate inserts? Wouldn't using Sets be best practice, since conceptually an RDBMS works with unique rows? Does Hibernate handle duplicate errors automatically? I would appreciate any knowledge if you could share.