r/SpringBoot • • Sep 14 '26

Discussion Spring Boot recommends extracted layout for production, so I measured how much it actually matters

Post image
37 Upvotes

I suspect some people here will say, “Of course you should extract the JAR".

And, to be fair, the Spring Boot documentation does recommend the extracted layout for production when startup matters. It points out that nested JAR loading has a startup cost.

What I found interesting is that this is not necessarily the path developers encounter first. The introductory Spring Boot material and several Getting Started guides still naturally lead you toward building an executable JAR and running it with java -jar. That was also the deployment path I had always used.

So rather than assuming the difference was important, I measured it.

I ran six alternating paired comparisons of the same Spring Boot 4.1.1 build on a 256 MiB Alpine VM. Same JDK 25 runtime, JVM flags, data, filesystem, and workload. The runtime layout was the variable being tested.

Results:

  • Spring startup: 11.056 s → 8.476 s, -23.3%

  • First request: 2.196 s → 1.448 s, -34.1%

  • Later requests: no material difference

  • Settled RSS: -3.8%, below the experiment's materiality threshold

  • Swap: no material winner

All six paired comparisons favored extracted layout for startup and first request.

My takeaway is not that everyone should blindly extract every Spring Boot application. It is that an official production recommendation that is easy to overlook had a surprisingly large effect in this particular setup, while memory barely changed.

Full write-up, charts, methodology, and experiment data:
https://pvrlabs.xyz/articles/spring-boot-extracted-layout.html


r/SpringBoot • • Sep 02 '26

How-To/Tutorial I open sourced my spring boot + spring ai project

37 Upvotes

Hey folks,

I’ve open sourced Windrunner, a self-hosted project management tool built with Spring Boot 4 + Spring AI for backend. If you are learning Spring Boot, I hope the project gives you something practical to explore — a complete application with an API, database, user interface, authentication, LLM/AI integrations, and more.

Github: https://github.com/shzlw/windrunner

The backend uses:

  • Spring Boot and Spring MVC for the application and REST APIs

  • Spring Data JDBC for database access

  • PostgreSQL for storage

  • Flyway for SQL database migrations

  • Spring AI’s MCP server support for exposing tools to AI clients

  • LLM Provider integrations for OpenAI, Anthropic, and Gemini

  • Docker and Docker Compose for running the application locally

The repository is a monorepo containing more than the Spring Boot backend. It also includes:

  • A React frontend

  • A TypeScript-based CLI tool

  • Playwright-based API end-to-end tests

If you’re interested in seeing how these pieces work together in one project, the repository provides examples across the backend, frontend, CLI, and testing layers.

Disclosure: I am the author of the project. Feel free to ask any questions, feedbacks or raise issues! ❤️


r/SpringBoot • • Jul 11 '26

How-To/Tutorial We catalogued the verified Spring Boot 3.5 to 4 failures, with the exact error messages, and fact-checked the migration guides that rank for it

37 Upvotes

With 3.5 out of OSS support since the end of June we've been moving client projects to 4.x, and I got tired of migration guides that paraphrase each other, so we went through the GitHub issues, the official release notes and the practitioner write-ups from the eight months since GA and verified everything against primary sources.

The compile errors and startup failures are well covered elsewhere. The tier that deserves more attention is the changes that run cleanly and do the wrong thing:

  • Depend on flyway-core alone and your migrations silently stop executing. Auto-configuration moved to spring-boot-starter-flyway (same for Liquibase). Your app starts fine and never migrates again.

  • spring-boot-starter-batch now gives you an in-memory job repository. Restartability is gone unless you switch to spring-boot-starter-batch-jdbc. Every functional test passes without it.

  • Jackson 3 sorts properties alphabetically by default and auto-registers every module on the classpath, so JSON output changes shape with zero code changes. JacksonException is also unchecked now, so catch (IOException) around serialisation stops catching anything.

We also found the popular guides contradicting each other, so for the record, checked against primary sources: Boot 4's floor is Java 17, not 21 (docs.spring.io system requirements). No CSRF default changed in Security 7; the post-upgrade 403s come from AntPathRequestMatcher/MvcRequestMatcher being removed and servlet-path inference ending. The transitional classic starters were not removed in 4.1; both are on Maven Central at 4.1.0.

Full disclosure: the complete write-up is on our company blog. It has the full error index with verbatim messages and sources, a third-party compatibility table as of July 2026, and the step-by-step path: https://tucanoo.com/spring-boot-3-5-to-4-the-complete-migration-guide-with-every-error-we-could-verify/

If you've hit something upgrading that isn't in the list I'd like to hear it; we're keeping the index updated and will only add reports we can verify.


r/SpringBoot • • May 10 '26

Discussion What kind of real-world backend projects/systems do experienced developers actually work on in companies?

37 Upvotes

Experienced developers of r/spingboot, can you share the high-level overview of projects/systems you’ve worked on in your companies?

Not asking for confidential details, just things like:

what problem the system solved

architecture at a high level

tech stack used

scale/challenges involved

how teams interacted

Most projects available online are toy CRUD/microservice demos, so it’s hard for aspiring/backend developers to understand what real-world enterprise systems actually look like in production.

Would really appreciate insights from people working in product companies, startups, fintech, travel, healthcare, etc.


r/SpringBoot • • May 08 '26

Discussion Monolithic vs Microservices Banking project

37 Upvotes

Hey I want to build a Banking management Fintech project for my resume I was thinking to build in the monolithic style but my senior said try to build in the Microservices way and currently I do not know that much about the Microservices..,I m building this project for the intern 2nd year student..


r/SpringBoot • • Mar 20 '26

Question Rest vs GraphQL

37 Upvotes

I think all the time in Spring Boot I have been using only Rest ,although i kind of get general difference between rest and GraphQL, how usually do you implement it in spring boot and when you should consider using rest and when GraphQL is a win in terms of efficiency ?


r/SpringBoot • • Mar 12 '26

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

37 Upvotes

r/SpringBoot • • Dec 12 '25

Question How does JPA work under the hood in Spring Boot?

37 Upvotes

Hi all! 👋

I’m learning Spring Boot and using JPA for persistence.

I understand basic annotations like @Entity, @ManyToOne, and @OneToMany, but I’d love a deeper explanation of how JPA works under the hood:

- How it manages entities and relationships

- How it generates SQL queries

- How caching and transactions are handled

Any insights, resources, or examples would be really helpful! 🚀


r/SpringBoot • • Dec 02 '25

Question Whats your favorite Spring/JWT implementation tutorial?

37 Upvotes

Ive been struggling with getting JWT implemented in a Spring project for a few days. Cant seem to find documentation or tutorials that are making it click for me. Or every time I find something that makes sense, the info is outdated and all the class methods have changed lol.

I would greatly appreciate it if you guys could share any resources that helped you with getting JWT set up in any of your Spring projects!


r/SpringBoot • • Nov 03 '25

Discussion Study partner for a 3 yoe as a java developer

37 Upvotes

Hi everyone! I’m a Java developer with 3 years of experience working in a service-based company. Most of my work has been with legacy Java systems, but recently I’ve started learning Spring and Spring Boot — covered the basics and built a few small projects.

Now, I want to deepen my understanding of:

Spring & Spring Boot (in-depth)

Microservices architecture

System Design (later)

DSA (for interview prep)

My goal is to crack a product-based company within the next year. I’ve worked with SQL, Azure, IntelliJ, and Postman, and have beginner-level frontend knowledge as well.

I tend to procrastinate when I don’t have structure — so I’m looking for a study/accountability partner with a similar background and goal, who wants to stay consistent, build strong projects, and grow together.

If this sounds like you, feel free to connect or drop a message! Let’s help each other stay consistent and level up

Additionally I am from NIT college with non circuit branch and my current ctc is 11lpa

I am not sure how we can study together but we can discuss about it

Thanks,guys


r/SpringBoot • • Sep 08 '25

How-To/Tutorial How I document production-ready Spring Boot applications [Final post in series]

37 Upvotes

Just completed my three-part series on building production-ready Spring Boot applications with the final post on documentation strategy.

What this post covers:

🔹 Documentation as Code - Using AsciiDoc stored in version control alongside source code

🔹 Living API Documentation - Spring REST Docs that generates docs from actual tests, ensuring they're always accurate

🔹 Architecture Documentation - High-level overviews with C4 diagrams generated from PlantUML

🔹 Self-Documenting Applications - Serving documentation directly from the Spring Boot application for easy access

Why this approach works:

  • Documentation stays in sync because it's part of the development workflow

  • New team members can quickly understand both architecture and API usage

  • Changes to docs are reviewed alongside code changes

  • No more outdated documentation misleading developers

The post includes practical examples from a petclinic application showing exactly how to set up each piece.

Previous posts in the series:

  1. How I write production-ready Spring Boot applications

  2. How I test production-ready Spring Boot applications

Together, these cover architecture, testing, and documentation - the three pillars of production-ready applications.

Link: https://www.wimdeblauwe.com/blog/2025/09/08/how-i-document-production-ready-spring-boot-applications/

Would love to hear how others approach documentation in their Spring Boot projects!


r/SpringBoot • • Jul 18 '25

Question What's everyone building using spring boot share your project idea here

37 Upvotes

Wanted to see what others are building using spring boot whether its a SaaS or just for learning what are you making I'm interested to know. If you want you can also share your tech stack or post a link to your website. I've been working on a few projects using JASP (Java, Angular, Spring Boot, and Postgresql)


r/SpringBoot • • Jul 08 '25

Question Where to Learn Spring Security

37 Upvotes

I have completed springboot basics and want to go further to spring security. It was a peacefull and interesting journey until theat point . When I steped in to security i dont know where to start how to start. I even started thinking what am I doing?! I feel just got stuck in this for days!!!!!!!!!! Please suggest me any way to start and learn. like any tutorials, websites blog anythin. (Most of the blog i searched was so old)


r/SpringBoot • • Jun 17 '25

Question 23M, 1 year jobless after graduation – what’s the smartest move I can make now?

37 Upvotes

Hey everyone,

I’m a 23-year-old computer engineering graduate, one year out from finishing my degree. I did a 3-month Java internship, but since then I haven’t been able to land a full-time role. I’m aiming for a software developer job and starting to feel the pressure from the gap on my resume.

Here’s where I stand right now:

  • Strong with Java

  • Regularly practice on LeetCode

  • A few small OOP projects

  • Some experience with Spring Boot

I’ve been applying to jobs and internships but haven’t had much success. I’m starting to feel like I need a more focused strategy.

Would it make sense to go all-in on Spring Boot and build a solid backend project to showcase? Or is there something else I should prioritize to really boost my chances?

Appreciate any honest advice from people who’ve been through this or know what works. Thanks in advance!


r/SpringBoot • • Jun 03 '25

News 🔥 Spring Boot + OpenAPI + Protobuf Integration Made Simple

37 Upvotes

The Problem: Using Protobuf messages in Spring Boot REST APIs? Your Swagger UI will be broken.

See: https://stackoverflow.com/questions/62938665/springdoc-openapi-ui-can-not-render-protobuf-models-causing-the-browser-to-crash

The Solution: One dependency. Zero configuration. Perfect OpenAPI docs.

Before vs After

Before (Broken Swagger):

u/RestController
public class UserController {
   @PostMapping("/users/{userId}")
   public User createUser(@RequestParam("userId") String userId) {
      return User.newBuilder()
              .setUserId(userId)
              .setUsername("Freeman")
              .setEmail("[email protected]")
              .setStatus(User.Status.ACTIVE)
              .build();
   }
}

❌ Result: Swagger UI crashes when trying to load protobuf schemas

After (Perfect Documentation):

Just add one dependency:

implementation 'io.github.danielliu1123:springdoc-bridge-protobuf:0.3.0'

✅ Result: Swagger shows proper schemas with all fields, types, and enums

📋 Complete Working Example

1. Your protobuf:

syntax = "proto3";

package user.v1;

option java_multiple_files = true;
option java_package = "com.example.user.v1";

message User {
  string user_id = 1;
  string username = 2;
  string email = 3;
  Status status = 4;

  enum Status {
    STATUS_UNSPECIFIED = 0;
    ACTIVE = 1;
    INACTIVE = 2;
  }
}

2. Your Spring controller:

@RestController
public class UserController {
    @PostMapping("/users/{userId}")
    public User createUser(@RequestParam("userId") String userId) {
        return User.newBuilder()
                .setUserId(userId)
                .setUsername("Freeman")
                .setEmail("[email protected]")
                .setStatus(User.Status.ACTIVE)
                .build();
    }
}

3. Open Swagger UI:

🎉 Perfect schemas with proper field names, enum values, and working "Try it out" functionality!

🔧 How It Works

SpringDoc OpenAPI can't understand protobuf messages by default. This library bridges that gap by:

  1. Teaching Jackson how to serialize protobuf (following official JSON mapping) via io.github.danielliu1123:jackson-module-protobuf

  2. Teaching SpringDoc how to generate schemas from protobuf types via io.github.danielliu1123:springdoc-bridge-protobuf

🔗 Links

Zero configuration. Just works. Happy coding! 🚀


r/SpringBoot • • Jan 27 '25

Guide Multi-Layer Cache in Spring Boot

37 Upvotes

I wrote a guide on using multi-layer caching in Spring Boot with Caffeine and Redis. It covers simple setups, common pitfalls, and building a custom CacheManager for better performance.

If you’re curious, here’s the link: https://gaetanopiazzolla.github.io/java/2025/01/27/multicache.html

I would like to have feedbacks about this if you want.

Thank you!


r/SpringBoot • • Dec 27 '24

Object of interface in Java?

37 Upvotes

The @Component annotation is used to create a bean, and annotations like @Repository, @Service, and @Controller are specialized forms of @Component. They mark a class for automatic bean creation and registration in the Spring loC context. However, when using interfaces (such as with @Repository), we cannot directly instantiate an interface. So, how does Spring create an instance of a class annotated with @Repository, especially when the class is defined as an interface?


r/SpringBoot • • Mar 02 '23

How to learn Spring Security.

37 Upvotes

I have to learn Spring Security for my job. I have implemented Rest Apis using spring boot till now. i know Java and Spring Boot. But Spring Security is too confusing for me to understand. I feel like i am missing something. Are there any prerequisites of learning spring boot. Any resources or any recommendations from experienced devs? Guide me please.


r/SpringBoot • • Jun 02 '26

News Idempotency4j - Java/Spring Boot Idempotency Library

36 Upvotes

The last couple of months, I ended up implementing HTTP API idempotency in 2 different Spring Boot projects back to back.

As I was implementing it in the second project, I decided to look up any existing solutions/libraries for Java/Spring Boot, but I honestly couldn't find one that felt clean and flexible enough for what I needed (and what most people probably need).

So I decided to build my own and open source it.

I released it about a month ago:
Repository : https://github.com/josipmusa/idempotency4j
Maven spring boot starter : https://central.sonatype.com/artifact/io.github.josipmusa/idempotency-spring-boot-starter

The goal was to make idempotency implementations feel straightforward and easy, but also to not scope it only to spring boot or a certain storage implementation. The library has a core which can be used on any method with pluggable storage backends. It also has an integration with spring web (servlet-based for now) and a spring boot starter to simplify usage. The implementation follows the IETF draft spec for the Idempotency-Key header.

Usage example for a spring boot project:

@PostMapping("/payments")
@Idempotent
public ResponseEntity<Payment> createPayment(@RequestBody PaymentRequest request) {
 // Runs exactly once per unique Idempotency-Key value.
 // Subsequent identical requests get the stored response replayed.
 return ResponseEntity.ok(paymentService.charge(request));
}

Right now it supports:

  • Spring MVC (Servlet-based apps)

  • JDBC storage (so it works out of the box with MySQL / PostgreSQL setups most people already have)

  • In-memory storage

  • duplicate request detection

  • replaying previous responses

  • concurrent request protection

  • request fingerprinting

  • configurable TTLs

  • pluggable storage backends

Curious whether others have run into this same problem and whether this library helps solve it for them.
Open to any feedback, suggestions, or reviews.


r/SpringBoot • • Mar 21 '26

Question What advantages Spring Boot 4.x currently has over competing technologies in web development?

36 Upvotes

I wanted to ask what advantages Spring Boot (in its latest version, V4) currently has over competing technologies in web development?

Spring has been the industry standard for years; ASP.NET, I suppose, is somewhat overshadowed by Spring (at least in terms of the number of implementations, the number of companies using it, and the number of jobs).

Spring is number one in enterprise applications. It has a strong position, but we must also remember that since its debut, new technologies have emerged – new frameworks and even new languages.

I wanted to ask what advantages Spring Boot 4.x has, whether it makes anything easier or does anything better, and what advantages it has over, for example, the GoLang or Rust ecosystem, or Python/Django/FastAPI, or the aforementioned C# and ASP.Net? There’s also Erlang, Elixir and Gleam – quite an interesting ecosystem based on functional languages.

Some people claim that Spring has grown to monstrous proportions and that learning it is difficult, cumbersome and time-consuming (very thick documentation and many modules).

Is Spring still worth considering for someone wanting to get started in web development?

Is learning Spring Boot still worthwhile and worth dedicating more time to? Is Spring Boot (now owned by Broadcom) being developed well, in the sense that is it heading in the right direction?

I know that Spring projects involve a lot of typing ;) The situation is improved by Kotlin, which, although it is being adopted more and more boldly in new projects, is still used far less frequently in projects than Java.

What do you think of Spring today compared to the competition, and what do you think its future holds?

Thank you for sharing your thoughts!


r/SpringBoot • • Jan 28 '26

Question Is this springboot-GenAI course actually worth??Honest reviews??

Post image
36 Upvotes

I’m thinking about buying springboot -GenAI course by Telusko in Udemy, but before spending money I wanted to hear from real people who’ve actually taken it or have good idea about it! Was it actually useful? Did it help you get better at java/springboot? Is the content up to date or kind of outdated? Would you honestly recommend or are there better alternatives?There are a lot of mixed reviews online and some feel kinda sponsored so I’d really appreciate honest opinions🙏 TIA🙂


r/SpringBoot • • Dec 18 '25

Discussion End-to-End Request Flow in a Spring Boot REST Application

36 Upvotes

Hello everyone, I’ve been studying the end-to-end flow of a request in a Spring Boot REST application, from the incoming HTTP request to the final response.

I made this diagram to help visualize how the different layers fit together and sharing it in case it’s useful to others. I'd also really appreciate any feedback, whether something important is missing, mislabeled, or could be improved.


r/SpringBoot • • Aug 03 '25

Question What's the most effective learning path for Spring Boot in 2025? Seeking a roadmap.

36 Upvotes

Hi everyone, I have a solid foundation in core Java and I'm ready to dive deep into Spring Boot to build modern backend applications and REST APIs. Instead of just jumping between random tutorials, I'm looking for a structured learning path or roadmap from experienced developers here. Thanks in advance


r/SpringBoot • • Jul 02 '25

Discussion ☕ I got tired of manually translating Spring Boot apps at work, so I built an AI tool that does it automatically!

36 Upvotes

Meet locawise-action - the FREE & open-source GitHub Action that makes Spring Boot localization effortless! 🚀✨

The problem: Manually syncing messages.properties files across multiple languages is a nightmare. Copy-paste hell between messages_en.properties, messages_es.properties, messages_fr.properties. Hours wasted on something that should be automated.

My solution: An AI co-pilot that integrates into your CI/CD pipeline, understands your app's context, and translates ONLY the new or modified properties using intelligent diffing.

How locawise-action Transforms Your Spring Boot i18n:

  • Automated Translations for Your Properties Files: When you push changes to your source src/main/resources/messages.properties...

  • AI-Powered & Context-Aware: Uses AI (OpenAI/VertexAI) to translate only the delta changes. Provide glossaries for domain terms and context to match your application's tone.

  • Creates Pull Requests Automatically: Generates updated messages_xx.properties files and opens a PR for review.

  • Keeps Translations in Sync: Integrates directly into your CI/CD pipeline - perfect for your Maven/Gradle builds.

  • Free & Open-Source: No subscription fees!

Super Simple Workflow:

  1. Update src/main/resources/messages.properties

  2. Push to GitHub

  3. locawise-action runs, translates, and opens a PR with all your locale-specific properties files updated ✅

Action: https://github.com/aemresafak/locawise-action
2 Min tutorial: https://www.youtube.com/watch?v=b_Dz68115lg

Results: We've eliminated manual localization across multiple Spring Boot microservices. What used to take days now happens automatically! 🎉

Perfect for teams using Spring's MessageSource and MessageSource annotations for internationalization.

Would love to hear back from you guys!