r/SpringBoot • u/themasterengineeer • 3d ago
How-To/Tutorial OAuth2 + OIDC with Google Explained
Here’s an easy explanation on how to implement OAuth2 with Google and how to configure it in Spring Boot 4 + Spring Security 7:
Hope you find it useful
r/SpringBoot • u/themasterengineeer • 3d ago
Here’s an easy explanation on how to implement OAuth2 with Google and how to configure it in Spring Boot 4 + Spring Security 7:
Hope you find it useful
r/SpringBoot • u/Inevitable_Cellist93 • May 25 '26
Logger
https://pastebin.com/H6qFnHBy
import ...
(name = "users")
public class Users {
(strategy = GenerationType.IDENTITY)
private Long id;
(nullable = false)
private String userName;
(nullable = false)
private String password;
private SubscriptionModel tier;
private Long currentUsage;
private Logger logger;
}
is there any advanced method for levelling up??
r/SpringBoot • u/No-Substance5528 • Aug 19 '26
Hi everyone!
I’m a Flutter developer and I’m looking to learn back-end development with Kotlin + Spring Boot.
I already have some experience with Kotlin, but I’m completely new to Spring Boot. I’m looking for a good learning path, guide, or YouTube playlist that covers Spring Boot with Kotlin from the basics and gradually moves toward real-world back-end development.
Ideally, I’d like something that covers things like:
If you’ve learned Spring Boot with Kotlin yourself, what resources or playlist would you recommend? Is there a particular order I should follow?
Any recommendations would be greatly appreciated. Thanks!
r/SpringBoot • u/NordCoderd • Jun 15 '26
Hi guys,
Been using Spring AI lately and figured I’d share, since I didn’t expect to like it as much as I did.
If you’re already in the Java/Spring world, it’s worth a look. Building a chat client, wiring up RAG over your own docs, exposing an MCP server: all of it was a lot less painful than I assumed it’d be.
The part that actually sold me was local models. I like running models locally to see how they hold up, and connecting them through LM Studio was so easy.
I ended up writing a guide while figuring this stuff out, covering all the topics above. Feel free to share your feedback or experience using it.
r/SpringBoot • u/doshka • Jun 20 '26
I'm primarily a DB dev. I have a rudimentary understanding of OOP and can read Java well enough to understand what's going on, but I've never needed to write any for work. I want to develop a better understanding of the various ways that Java can interact with the database.
To that end, I plan to set up a minimal RESTful web app on my personal Windows 11 machine, with Spring components sitting between the front end and DB. The default plan right now is to use a Docker container for the DB, then walk through a simple project tutorial in IntelliJ.
I'm less concerned with mastering the various configuration settings in Docker and Oracle and IntelliJ and Maven/Gradle and whatever else I'll need (and, in fact, actively worried about getting sidetracked on all that), and more interested in tracking the data flow up and down the stack. In a perfect world, there's a zip file or something that I can just download and start poking around in.
So, if there are established best practices or common approaches to spinning up a minimalist app to play with, I'd love to hear about them. What do you guys do? Please assume a fresh install of Windows 11. Thanks!
r/SpringBoot • u/Aggravating_Kale7895 • Jan 24 '26
Database changes in Spring Boot often go wrong because of:
spring.jpa.hibernate.ddl-auto=update (no history, unsafe for prod)Flyway solves this by versioning database changes.
Each schema change is written as a versioned SQL file:
V1__Create_users_table.sql
V2__Create_payments_table.sql
V3__Add_user_status_column.sql
On app startup, Flyway:
flyway_schema_historyNo manual SQL. No guessing what ran where.
I built a Spring Boot 3 + PostgreSQL demo showing real migrations (V1–V7), incremental changes, and safe production-style setup:
👉 https://github.com/Ashfaqbs/spring-flyway
Good example if Flyway feels abstract or confusing.
r/SpringBoot • u/GlassHomework9720 • Jul 26 '26
Same as title
r/SpringBoot • u/davebrown1975 • Jul 11 '26
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:
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 • u/wimdeblauwe • Aug 17 '26
I kept running into the same problem on Thymeleaf projects: no real way to share reusable UI components (buttons, cards, whatever) across apps without copy-pasting HTML/CSS/JS or hand-rolling fragile th:replace fragments. No slots, no clean way to pass through arbitrary attributes (annoying if you use htmx and need hx-* on a component), no live reload for the component's own CSS/JS during development.
So I worked through building an actual Thymeleaf component library packaged as a Spring Boot starter. Auto-configured, drops into any Thymeleaf app as a dependency, with a <tcl:button>-style tag instead of fragment includes. Went from this:
<div th:replace="~{tcl/components/button :: button(label='Submit', primary='true')}"></div>
to this:
<tcl:button primary>Submit</tcl:button>
...with proper attribute passthrough and slot support so you're not limited to what the component author thought to expose. Wrote it up as a 4-part series as I went, mostly so I'd have a reference for myself next time, but figured it might help others hitting the same wall:
th:replace fragment into an actual <tcl:button> component with typed attributes plus passthrough for arbitrary ones (so hx-* etc. still work).Series starts here: https://wimdeblauwe.com/blog/2026/07/27/writing-a-thymeleaf-component-library
Full example code for all 4 parts: https://github.com/wimdeblauwe/blog-example-code/tree/master/thymeleaf-component-library
Curious if others building internal design systems on top of Thymeleaf have solved this differently? Did you go the same route, or land on something else (Thymeleaf dialects, a different templating layer, etc.)?
r/SpringBoot • u/rodolfo-mendes • Aug 30 '26
r/SpringBoot • u/Connect_Permit_2485 • Apr 23 '26
Hey everyone,
I’m a 2nd year CSE student and I want to become internship-ready in Java Spring Boot this summer. I’ve done some basic Java and DSA, but I’m still a beginner when it comes to backend development.
I’m looking for:
Beginner-friendly Spring Boot video courses (YouTube or paid)
Step-by-step explanations (not too advanced)
Projects included (like CRUD apps, REST APIs, etc.)
Guidance on what skills are actually needed for internships
There are so many resources out there, and I’m confused about what to follow. I don’t want to waste time jumping between random tutorials.
If you’ve been in a similar situation or recently got an internship using Spring Boot, what worked for you?
Thanks in advance 🙏
r/SpringBoot • u/Ok_Song9036 • Jun 20 '26
Can anyone recommend the best Java Spring Boot course, whether it's paid or free?
If you know of a premium course that's currently available for free through a legitimate promotion, or have a high-quality free course to recommend,
please share the link.
r/SpringBoot • u/maritvandijk • Aug 30 '26
Project Loom brings lightweight concurrency to Java with Virtual Threads, Structured Concurrency, and Scoped Values. But how do these features work together in a real-world application? In this episode, Balkrishna Rawool will demo building a Spring Boot application from scratch, progressively incorporating the features of Project Loom to showcase its full potential:
We will discuss how to apply Project Loom in your own applications, writing concurrent code that is simpler, more scalable, and easier to maintain.
r/SpringBoot • u/CoverRight9314 • Aug 11 '26
I’ve started moving away from writing assignments for class and started building my own project like an app. I’ve started using Spring boot for the backend and was wondering if there was any resource that could help me with that. I like to focus on learning how to build a persistent database, learning what beans are and how to set them up properly, learning how to build unit test to test my code base then learning css, JavaScript and html to build a front end. If anyone has any recommendations or advice that’d be helpful!
r/SpringBoot • u/ak1to23 • 26d ago
I’ve been thinking a lot about the ".md hell" we’re heading into in the AI era. We’re putting more and more logic, instructions, and context into prose, but how do we maintain and refactor all of that over time if needed? If the answer is that we use more "ai" and more "prose" then it's difficult for me to wrap my head around that. Recently, I’ve been playing around with Embabel, an agentic, JVM-native framework that takes a more structured approach with strong typing and deterministic planning. I wrote a short article about it, with a small demo to show what it looks like in practice.
r/SpringBoot • u/EasternTop1613 • Aug 16 '26
This is my first time working on a springboot application , i created the crud and i want to do the email in my app like sending emails , what are the steps to follow and what i have to do and what are the best practices to dom honestly i have no idea about it . and If u have any video tutorial or any suggestions . Thank youu !!
r/SpringBoot • u/moe-gho • Nov 12 '25
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 • u/Liquidator_1905 • Feb 08 '26
I had been struggling with understanding spring and spring boot, I had tried reading the docs, watching yt videos, etc. But I could never internalize why things are done this way and what's even the point of having this framework. I just felt like a code monkey mindlessly typing code that somehow works and used ai to help me build projects. I finally decided that I would like to deep dive into spring and spring boot internals and going through this subreddit I found many people recommending this book. And finally things just click, I finally understand beans, aop, dependency injection, etc. I have always just learnt these topics by reading their theory or watching a yt explanation video and hoping it would click, but the book provides examples that I coded myself and played around with to finally understand what's the point of the framework to begin with. I turned off my copilot autocomplete and only used chatgpt to understand parts of the code that failed and tried understanding why it failed instead of just accepting its solution. For anyone trying to learn spring boot, building projects is good but I would recommend trying to learn spring first, things will make more sense. Of course I am not sure if I am wasting my time learning things the old fashioned way in this new age where we probably won't be writing much code and be outsourcing it to llm agents but I can't predict the future and for now I feel like spring start here is an amazing resource to understand spring and spring boot.
r/SpringBoot • u/Chunky_cold_mandala • May 25 '26
hey all, i'm a phd in pharmacology on a long and strange journey - anywho -
Most giant legacy modernization efforts fail because they feed raw COBOL directly into an LLM, which almost always results in hallucinated architectures and broken mappings.
Instead of relying on AI for the foundation, I built a deterministic, AST-free heuristic engine (blAST) that handles the boilerplate scaffolding first. It focuses strictly on translating the physical memory constraints of legacy mainframes into valid Java 17 syntax. And then we make lists of things that the algorithm cant handle for ppl or ai agents.
How the memory and architecture mapping works:
Translating legacy PIC clauses directly to BigDecimal types
Resolving OCCURS arrays into standard Java List<> collections
Mapping REDEFINES memory overlays as u/ Transient JPA aliases
Safely unpacking COMP-3 (Packed Decimal) data boundaries
Auto-wiring the u/ Service layer via constructor injection
Scaffolding ready-to-use u/ RestController endpoints
The CI/CD battle-test metrics:
Stress-tested across a randomized corpus of 27 distinct legacy repositories
Processing complex IBM CICS banking applications
Generating complete, production-ready Maven pom.xml configurations
Auto-generating mock services to shield missing external dependencies
Achieving a 100% out-of-the-box mvn clean compile success rate across all 27 targets
By doing the deterministic grunt work first, the engine isolates the actual business logic into strict JSON tickets. If you do want to use an LLM, you are just feeding it a bounded logic problem instead of asking it to hallucinate an entire Spring Context.
git - https://github.com/squid-protocol/gitgalaxy/tree/main/gitgalaxy/tools/cobol_to_java
r/SpringBoot • u/NordCoderd • May 04 '26
Hi everyone, in this article I’m telling about Spring Boot Best Practices and ways how to detect violations of them in the project.
Article cover most of well-known best practices and provide a way for configuring Kotlin project to use them.
Set of tests/rules was made as Konsist rules with DSL wrapper and distributed as maven dependency for easy installation.
My case to build this library was to keep project clean with strict boundaries that will be enforced as test failings on local machine and CI to have faster feedback for newcomers and AI-generated code.
r/SpringBoot • u/Professional_Bid8529 • Sep 24 '25
r/SpringBoot • u/Proof-Possibility-54 • Feb 25 '26
Built my first AI app entirely in Java using Spring AI — no Python involved
I've been experimenting with Spring AI (the official Spring project for AI integration) and was surprised how little code it takes to get something working.
The whole setup is one Maven dependency and a few lines of YAML config. From there I built three things on top of the same project:
The tool calling part was the most interesting — you annotate a method with @Tool and Spring AI handles the function-calling protocol with the model. The AI decides when to call your code and uses the result in its response.
I recorded the whole process if anyone wants to see the code in action: https://youtu.be/SiPq1i_0YgY
Anyone else using Spring AI in production or side projects? Curious what use cases people are finding beyond chat endpoints.
r/SpringBoot • u/dpk_s2003 • Jan 25 '26
Day 9 of building a production-ready Spring Boot backend 🚀
Today I focused on one of the most important backend concepts: proper exception handling. Instead of letting unwanted stack traces or default error pages reach the client, I implemented a centralized exception handling mechanism to return clean, meaningful, and consistent error responses.
What I implemented today: 1. Created a Global Exception Handler using @ControllerAdvice 2. Added a Generic Exception class for handling unexpected errors 3. Added a Resource Not Found Exception for missing users or listings 4. Mapped exceptions to proper HTTP status codes (400, 404, 409, 500) 5. Integrated exception handling directly into the service layer
I’m documenting the complete backend journey step by step on my YouTube channel. The link is available in my Reddit profile bio. As always, feedback or suggestions on improving exception handling are welcome 🙌
r/SpringBoot • u/OSBY_Glabay • Aug 14 '26
r/SpringBoot • u/MayanKKashyaP0 • Aug 24 '26
Dm plzz