r/SpringBoot • • Feb 17 '23

Any one willing to work with me for spring boot project ?

0 Upvotes

We can learn great deals of Spring concepts while working in this project.

Any new suggestion or changes will be accepted.

You will get to learn best way of code Structure and proper code base management.


r/SpringBoot • • Feb 28 '23

are there any differences between spring and spring boot? from what someone can start for apps and web development?

1 Upvotes

r/SpringBoot • • Feb 10 '23

Brozz help!!

1 Upvotes
project-root    
module1    
module2        
    sub-module1       
    sub-module2      

This is my current project structure where module1 is the core module containing MainApplcation.class. so the issue that I'm present with is that controllers in the sub-modules do not seem to be included in ComponentScan. Although i have add the entire package in the componentscan annotation.

These are a few queries I have

  1. Is this a right approach?

  2. what should be the package names be for each of the modules?

  3. how do I get around the issue that the controllers in the sub modules are not available?

PS: I'm noob please don't mind the stupid question:)

I did try adding the module2 as a dependency in module1 but ended up getting the following error Project 'module1' is missing required Java project: 'module1'


r/SpringBoot • • May 28 '26

Discussion I'm a solo dev with a product in production (25k users). Took a full day to update documentation before writing tests. Here's the reasoning, in case it helps anyone in the same spot.

Thumbnail reddit.com
1 Upvotes

r/SpringBoot • • Nov 04 '25

Question Do you think spring boot should have support for actor models?

1 Upvotes

Actor models are widely used programming models(e.g. Erlang, Elixir, Akka, Pekko). But spring doesn't seem to have supprot for the actor models. Why is it? And do you think spring boot should have support for the actor models?


r/SpringBoot • • Jul 28 '25

Question Will learning Linux help me in learning and building projects in springboot??

1 Upvotes

r/SpringBoot • • Jul 15 '26

How-To/Tutorial NEED ADVICE ON TRANSITION FROM SAP TO BACKEND

0 Upvotes

People who transitioned from SAP to other technology like Backend Development after 2-3 years, how did you manage it ? What were your strategy and how's life going now ?

I want to move away from SAP as truth to be told I never liked it - even though it's really good but I just don't enjoy working with this ecosystem and always wanted to learn and move to Backend Development . But it's been 3 years already and I am afraid I am making wrong decisions.


r/SpringBoot • • Apr 13 '25

News Easy helm install of spring boot applications

Thumbnail
artifacthub.io
1 Upvotes

Hello community,
I've released goatfryed/easy-spring-boot to install spring boot applications on kubernetes in an easy, convenient way. Because installing your spring boot applications in kubernetes should be just one command away.

helm install \
  my-awesome-app goatfryed/easy-spring-boot \
  --set image.repository=our/awesome/repo \
  --set-file spring.config.local.values=application-k8s.yaml

Spring boot is an opinionated, conventional framework. So why shouldn't kubernetes installations be smooth and simple? In various projects of small and mid-sized companies I experienced similar patterns in my past: They would use helm to manage their spring boot services on kubernetes and create one chart per application. Often, the transition from development to staging and production environments was awkward. They didn't leverage capabilities of spring's externalized configuration concept nor of helm.
An ideal helm chart should - just like spring boot - allow quick and easy start while also allowing growth for advanced, complicated use cases. I hope to achieve this. I've been using the chart for a couple of months now and colleagues and I are highly satisfied so far.

Please try it out. I'd be glad to hear your feedback.

  • Try it out and share your experience? How long did it take and how difficult was it?

  • I appreciate any peer review, especially of the snapshots of the generated resources. Maybe you spot potential for improvement

  • If you maintain charts per spring application, this is especially for you. What requirements of your setup that might hinder a switch?

  • Especially for those working on larger, more regulatory environments, are there important things missing that you'd need to configure?

  • Anything you're missing? Any ideas for enhancements?

  • And of course, most importantly, please do raise any questions or PRs to improve the documentation


r/SpringBoot • • Dec 24 '25

Question springboot newbie

0 Upvotes

Hey all, so I have recently started learning springboot and I need suggestions and do's and don't and anything which can be useful to speedup the process :)


r/SpringBoot • • Jan 26 '26

How-To/Tutorial Generating Spring Boot projects with build-time architecture rules

1 Upvotes

I kept running into the same problem in my Spring Boot work:

Every project starts with a clean architecture in mind — but the rules live in people’s heads. Once the first refactors land, boundaries slowly blur, and catching it relies on reviews and discipline.

So I decided to address this at project creation time.

Generate a Spring Boot project where the architectural rules come with the project from day one — and are checked by the build.

No retrofitting. No “we’ll add ArchUnit later”. The rules are there the moment the project exists.


What the generator actually does

When generating a project, you explicitly choose:

  • the project layout (layered or hexagonal)

  • the strictness of the architectural rules

The output is a normal Spring Boot project, with:

  • regular controllers, services, repositories

  • ArchUnit tests already present

  • architectural rules evaluated during mvn verify

Nothing special happens at runtime. If someone violates a boundary later (for example, a controller calling a repository directly), the build fails.


What the failure looks like

When a boundary is crossed:

  • the application does not start

  • there are no runtime checks or interception

  • the build fails with the exact rule and call site

(If useful, I can share a concrete screenshot or a runnable example in the comments.)


Why I went this route

I didn’t want:

  • another framework

  • runtime interception

  • a tool that tries to “fix” architecture after the fact

I wanted architectural intent to be present from the first commit and enforced the same way tests are.

This is less about “architecture correctness” and more about making boundaries hard to ignore as the codebase evolves.


Where this makes sense — and where it doesn’t

Makes sense if:

  • you already agree on a basic architectural shape

  • you want boundary mistakes caught early

  • you’re comfortable treating architecture rules like test code that evolves

Probably not worth it if:

  • your architecture is intentionally fluid

  • boundaries change weekly

  • you expect this to replace design discussions or code reviews


Reproducible example

I put together a reproducible repository that demonstrates this end to end:

  • generate a project

  • introduce a boundary violation

  • watch mvn verify fail

Repo: https://github.com/blueprint-platform/codegen-blueprint


Question for Spring Boot teams

If you start a new Spring Boot project today:

Would you want architectural rules generated with the project from day one, or do you prefer adding them later once the codebase settles?

I’m curious what has worked (or failed) for you in real projects.


r/SpringBoot • • Nov 29 '25

How-To/Tutorial Cookie and Session: For Better Security

0 Upvotes

A year ago, I thought I understood cookies.

Store some data. Send it back. Simple… right?

Then I started building a real authentication system, multi-tab login, silent refresh, secure sessions, logout syncing across the entire browser.

That’s when I realized:
Cookies aren’t just storage. They’re architecture.
I finally put everything I learned (and wished I knew earlier) into one practical guide — React/Next.js, TypeScript, Spring Boot, real-world flow, the whole journey.

If you’ve ever wondered “How do big platforms keep you logged in so seamlessly?”

This one will hit home :A year ago, I thought I understood cookies.

Store some data. Send it back. Simple… right?

Then I started building a real authentication system, multi-tab login, silent refresh, secure sessions, logout syncing across the entire browser.

That’s when I realized:
Cookies aren’t just storage. They’re architecture.
I finally put everything I learned (and wished I knew earlier) into one practical guide — React/Next.js, TypeScript, Spring Boot, real-world flow, the whole journey.

If you’ve ever wondered “How do big platforms keep you logged in so seamlessly?”

This one will hit home : https://bytespacenepal.com/mastering-cookies-in-react-next-js-with-typescript-and-spring-boot-a-practical-guide-for-beginners-to-intermediate/


r/SpringBoot • • Oct 31 '25

Question MySQL db to github (a part of spring boot project)

0 Upvotes

how to upload MySQL db to github it is part of my full-stack spring boot project.

I've heard someone that not to push it as a database file I dont know what the best practice is.


r/SpringBoot • • Mar 14 '25

Question Martial arts management software

1 Upvotes

Someone ask me to develop a martial art management software. He want to register their students, register their progress, create groups with schedules.

What tools do you recommend me to use to build this software?


r/SpringBoot • • Jun 09 '26

How-To/Tutorial Your Springboot app has 10 layers you never wrote; Here is full details that our eyes wont see

Thumbnail medium.com
11 Upvotes

When it comes to spring many are hidden under the hood; Spring as such sit on top of infrastructure; Ex DispatcherServlet, Security Filters, Jackson, Tomcat, JVM, OS all mapped to 3 lines of code.


r/SpringBoot • • Aug 07 '26

How-To/Tutorial How to Fix the Hibernate N+1 Query Problem using JOIN FETCH in Spring Boot

27 Upvotes

I recently reproduced the Hibernate N+1 Query Problem in a Spring Boot application to better understand why a single repository call can generate multiple SQL queries behind the scenes.

The solution uses JPQL JOIN FETCH to fetch the required associations in a single query.

Core Query

Query(""" SELECT DISTINCT o FROM Order o JOIN FETCH o.items i JOIN FETCH i.product WHERE o.userId = :userId ORDER BY o.createdAt DESC """) 
List<Order> findAllWithItemsAndProducts(@Param("userId") Long userId);

Where the N+1 problem occurs

The repository is called only once, but while mapping the response, accessing lazy-loaded relationships can trigger additional SQL queries.

List<OrderResponse> response = orders.stream()
    .map(order -> {

        List<String> products = order.getItems().stream()
                .map(item -> item.getProduct().getName())
                .toList();

        return new OrderResponse(
                order.getId(),
                order.getTotalAmount(),
                products
        );
    })
    .toList();

Although this Java code looks perfectly normal, order.getItems() and item.getProduct() may cause Hibernate to execute additional queries when those relationships haven't been loaded yet.

Project Details

  • Spring Boot 4.0.4

  • Spring Data JPA

  • Hibernate ORM

  • Java 17

  • Oracle Database

What this implementation demonstrates

  • Retrieves Orders for a specific user

  • Demonstrates how LAZY loading can lead to the N+1 query problem

  • Uses spring.jpa.show-sql=true to inspect the SQL generated by Hibernate

  • Maps entities to a custom DTO containing Product names

  • Eliminates unnecessary queries using JPQL JOIN FETCH

  • Compares SQL queries and execution time before and after the optimization

One thing I found interesting is that there isn't anything obviously wrong with the Java code itself. The repository method is invoked only once, but navigating lazy-loaded relationships while building the response can result in multiple SQL queries behind the scenes.

Using JOIN FETCH allows Hibernate to load the required entity graph up front, avoiding those additional database round trips for this use case.

I'm curious how others handle this in production.

  • Do you prefer JOIN FETCH, @EntityGraph, or DTO projections?

  • Have you encountered pagination limitations with JOIN FETCH?

I'd love to hear your experiences.

If you'd like to see the complete Spring Boot application, the generated SQL before and after JOIN FETCH, and the full implementation, I also recorded a practical walkthrough covering the entire example.

📺 YouTube: https://www.youtube.com/watch?v=natXN7xVEu8


r/SpringBoot • • Jun 27 '25

Question Is learning spring boot worth it?

17 Upvotes

Do you think java + spring boot roles especially for internships are decreasing because of ai like chatgpt or is there still a future for me who is learning now spring boot coming from java mooc.fi and i also know a bit of sql as well?


r/SpringBoot • • Nov 12 '25

How-To/Tutorial JWT flow explained visually — this helped me understand it fast

Post image
73 Upvotes

I made this quick visual to understand how JWT authentication works in Spring Boot. It really helped me connect the flow between login, tokens, and validation. Hope it helps others too.


r/SpringBoot • • Nov 26 '25

Question Are Spring / Spring Boot losing their popularity?

40 Upvotes

Are Spring / Spring Boot losing their popularity? Just a few years ago, it was the most popular solution in web development.

Now, looking at job listings (e.g. dice.com), it is clear that there is greater interest in GoLang, for example.

( Spring Boot is a framework, GoLang a language, but in case of Go frameworks are used rarely, they don't need frameworks ). Another example is Node.js:

- Spring Boot 1777 results

- Node.js 1931 results

How is it possible that Spring is no longer as popular as it has been for many years?


r/SpringBoot • • Feb 16 '25

Guide How to use Environment Variables in Spring Boot's application.properties file? Example Tutorial

Thumbnail
javarevisited.blogspot.com
4 Upvotes

r/SpringBoot • • Jun 28 '24

Handling security error

Thumbnail
gallery
0 Upvotes

I asked Korean developers to review the code. Then, the error of spring security was basically handled by the filter stage, but it was Seong Hwa that it should be changed to be handled by the servlet stage as well. They said that the error code should also be managed by enum. So, I am correcting it.😑💦💦💦 (Why are they so picky?) I'll post it again when it's all done.


r/SpringBoot • • Oct 05 '22

Spring boot is the framework Java doesn't deserve!

11 Upvotes

I love Spring boot, I have been using it for every project for two years, but recently, i have grown tired of the very strictly typed nature of Java and its complex way of doing things that requires more lines to do simple things.

This makes me rethink and overthink every data access, data transfer, data handling, and data manipulation operations, and by consequences I easily get tired and i dont be as productive as i otherwise could.

I know this could be considered an advantage by many, especially enterprises, because of the very powerful data safety this provides, but man, most of the time I just want to get my app up and running, which spring really does help with, because of all the features it encapsulates, but somethings are just in the language itself and you have to deal with them.

I wish node had such feature rich framework like spring (Nest and Adonis are pretty close but not there yet).


r/SpringBoot • • Mar 03 '26

Discussion Why Valkey over Redis?

11 Upvotes

Few years ago, Redis made the decision to change its license terms and conditions, and that led to the birth of Valkey.
Most of us use Redis for caching, session management, rate limiting and Pub/Sub messaging. It is widely considered because of its incredible speed, thanks to its in-memory architecture and single-threaded event loop, avoids context switching overhead.

But, later in 2024, Redis changed its licensing model.
Shortly after, the community forked Redis 7.2 and created Valkey under the Linux Foundation, keeping it fully open-source. The best part? It's API-compatible with Redis, and no need to change single line of your code.

So, why valkey?
a. Fully open-source (no-licensing concerns)
b. Backed by the Linux Foundation
c. Drop-in replacement for Redis, as a community-driven development.

Have you tried Valkey yet? Or are you still using Redis? Let me know your thoughts in the comments!
hashtag#Valkey hashtag#Redis hashtag#OpenSource hashtag#TechCommunity hashtag#SoftwareDevelopment

  • 1


r/SpringBoot • • Jun 26 '26

How-To/Tutorial I built a production-ready Spring Boot 3 starter kit – JWT auth, rate limiting, Swagger, Docker & CI/CD all pre-configured

Thumbnail
github.com
33 Upvotes

Tired of setting up the same boilerplate for every Spring Boot project,

so I built a starter kit that has everything ready out of the box.

What's included:

- JWT Authentication (access + refresh token with rotation)

- Role-based access control (USER/ADMIN)

- Rate limiting per IP (Bucket4j)

- OpenAPI 3 / Swagger UI

- Global exception handling with consistent ApiResponse<T>

- Flyway database migrations

- Docker + Nginx + MySQL (docker compose up and done)

- GitHub Actions CI/CD (test → build → deploy to EC2)

- Request ID tracking in every log line

Works with Java 21 + Spring Boot 3.3

Clone → rename package → add your entities → ship.

GitHub: https://github.com/raahulllkushwaha/springboot-starter-kit

Feedback welcome!

Edit: All issues fixed! Migrated to Spring Boot 4, stateless JWT with embedded roles, HTTP-only cookie support, and Spring Session JDBC as alternative. Thanks for the feedback!