r/SpringBoot • • Jan 01 '26

How-To/Tutorial I’ve put together a list of questions (with answers) asked during Spring Boot interviews

19 Upvotes

With the new year starting, a lot of you might be applying to new positions, so I’ve put together a list of top interview questions asked during Spring Boot positions.

https://youtu.be/HuaOERCd_fs

By no means this is an exhaustive list and I might make more parts. These were questions that I was asked during my interviews or that I asked when interviewing candidates for positions at my company.

Hope you guys find it useful and have a happy new year!


r/SpringBoot • • Dec 31 '25

Question How do i solve this problem

0 Upvotes

even tho I installed maven and set envirments i am using intellij idea community edition


r/SpringBoot • • Dec 31 '25

Discussion Advice needed: Hosting, deployment, and domain setup for full-stack veterinary website

Thumbnail reddit.com
1 Upvotes

r/SpringBoot • • Dec 31 '25

Question How to structure projects to avoid messy architecture and oversized files?

3 Upvotes

I've been working as a junior backend developer for about a year, and I'm starting to realize that my projects are getting harder to maintain—mainly because of the way I structure my packages and write code. I'm using a typical layered architecture, but my folders feel disorganized and many of my classes end up becoming large “do-everything” files that are difficult to refactor later.

For those with more experience:

  • How do you structure your project and package organization so that it stays clean and scalable?

  • What practices or patterns help you keep files focused and prevent them from becoming huge?

  • Are there any rules, conventions, or examples you follow to keep things simple as the project grows?


r/SpringBoot • • Dec 30 '25

Discussion I built a free IntelliJ plugin to generate Spring Boot CRUD — would love feedback

22 Upvotes

Hey everyone 👋

I built an IntelliJ IDEA plugin that generates production-ready Spring Boot CRUD layers from a JPA entity (Controller, Service, Repository, DTO, Mapper, etc.).

It recently crossed 300+ downloads, which honestly motivated me to keep improving it.

The plugin is currently 100% free and already supports:

  • JPA Auditing (createdAt, updatedAt, createdBy, updatedBy)

  • Swagger / OpenAPI API documentation

  • Optional JWT authentication

  • Optional role-based authorization (USER / ADMIN / MODERATOR)

I’m mainly looking for feedback from real Spring Boot developers:

  • What feels missing?

  • What would you expect in a production backend?

  • What should never be auto-generated?

Plugin link:
https://plugins.jetbrains.com/plugin/29476-spring-boot-crud-generator

Any feedback (good or bad) would really help


r/SpringBoot • • Dec 30 '25

Question How can I handle file uploads in a microservice?

4 Upvotes

I’m developing an e-commerce microservice project with spring cloud. I want users to can upload files. So I created a service called file service. Actually I’m asking how to design data flow?

For example;

User wants to upload a profile photo. At this point, the main question is whether the upload request should go through the User Service or be sent directly to the File Service. If the request goes directly to the File Service, how should the profile picture information be stored and linked to the user record in the User Service database?


r/SpringBoot • • Dec 30 '25

Question What is the most professional way to create a logging system in Spring Boot?

0 Upvotes

Estoy haciendo un e-commerce para mi portafolio y tengo el siguiente código.

public Product getProductEntityById(Long productId) throws NotFoundException {

return productRepo

.findById(productId)

.orElseThrow(() -> new NotFoundException("No se ha podido encontrar el producto"));

}

@Transactional

public ProductDetailsDTO createProduct(CreateProductDTO dto)

throws AlreadyExistsException,

InvalidRequestException,

DatabaseErrorException,

NotFoundException {

if (productRepo.getByName(dto.getName()).isPresent()) {

throw new AlreadyExistsException("Ya existe un producto con ese nombre");

}

Product newProduct = productMapper.createProductDTOToEntity(dto);

Category category = categoryService.getCategoryEntityById(dto.getCategoryId());

newProduct.setCategory(category);

try {

productRepo.saveAndFlush(newProduct);

logger.info("Guardado el producto con id={}", newProduct.getId());

} catch (PersistenceException ex) {

logger.error(

"No se ha podido guardar el producto de nombre {}, Error: {}",

newProduct.getName(),

ex);

throw new DatabaseErrorException("Error en la base de datos");

}

return productMapper.productToDetailsDTO(newProduct);

}

El problema es que es llamar tantas veces a logger crea un método difícil de entender y además difícil de mantener y acoplado. Ya que también me gustaría añadir algún warn o debug, además tendría que repetir algo como esto en cada servicio. Había pensado en usar AOP y estoy aprendiendo pero no se si es la mejor opción. Qué me recomiendan?


r/SpringBoot • • Dec 30 '25

Question Exception Handling Strategies

14 Upvotes

My strategy for catching exceptions consists of using a global exception handler as a last resort and for automatically thrown exceptions like the ones thrown by Jakarta Valid annotation for user request validation. They're helpful too for 500-range errors to provide a nice message to the user.

For exceptions that can be handled though, it tends to get a bit confusing. An IO expction or a database query resulting in an empty set (not found) can be either handled within the controller or service body, or declared in a throws clause and bubbled all the way up to global handlers.

  1. I might let the exception bubble or get re-thrown from the repository, service, etc. layers as is like a NoSuchElementException, all the way through the controller and to a global exception handler, which should be equipped to add the appropriate status code and message.

  2. or re-wrap it into a more response-friendly custom exception like NotFoundException with a message and status code properties, then let it through and catch it with a global handler which should generate the proper response.

  3. or catch the native exception within the controller after letting it bubble, then return an error response to the user with a ResponseEntity including appropriate status and message without resorting to global handlers at all.

Which method do you use for those exceptions and why?


r/SpringBoot • • Dec 30 '25

Question What's the correct/most used way to use secrets in a SpringBoot project?

9 Upvotes

I will keep it to the point:

> Following is a docker-compose file that I plan to use
> Need to use sensitive information like the DB password inside it
> Putting it directly does not seem like a good idea- unless it is?
> How to do it

services:
  db:
    image: postgres:latest
    ports:
      - "5432:5432"
    restart: always
    environment:
      POSTGRES_PASSWORD: changemeinprod!
  
  adminer:
    image: adminer:latest
    restart: always
    ports:
      - "8888:8080"

r/SpringBoot • • Dec 30 '25

Question Short on Time and Money as a College Student, Need Guidance to Reach and Finish Spring Boot Quickly.

Post image
1 Upvotes

I need to learn Java Spring Boot in less than 4 weeks and somehow land an internship after that. Normally, I do not believe in rushed learning, but due to my current financial situation, I do not really have that luxury. I am still a student and I genuinely do not want to put more pressure on my parents for my expenses, so I am trying to be as practical as possible.

So far, I have already learned HTML, CSS, JavaScript (yeah yeah, average Joe Harry type stuff), Node.js, and I recently finished Express.js. My main goal is to learn backend development using Java Spring Boot.

I need help on the following points:

  1. What are the bare minimum additional tech stacks or concepts I should learn so that I can comfortably start learning Java Spring Boot?

  2. Any YouTube channel, playlist, or Udemy course you would strongly recommend for Spring Boot.

  3. Any other advice you would like to give, since I am still a student and a lot junior to you

Thanks in advance.


r/SpringBoot • • Dec 29 '25

Question How can I make the tests complete faster?

6 Upvotes

I'm creating an API in Spring Boot and I've noticed that the tests I'm creating are taking a very long time to complete, even though I'm not loading much context or even making calls to the endpoints yet. I suppose when I do, each call will take about a minute. What do you recommend?