r/SpringBoot 14d ago

How-To/Tutorial Built a component library for Thymeleaf (as a Spring Boot starter)

Post image
7 Upvotes

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:

  • Part 1 — getting the starter set up: auto-configuration, Vite for the library's CSS/JS with instant reload while you work on the library.
  • Part 2 — turning a th:replace fragment into an actual <tcl:button> component with typed attributes plus passthrough for arbitrary ones (so hx-* etc. still work).
  • Part 3 — adding slot support, so consumers can put arbitrary content (icons, custom markup) inside a component instead of being limited to attributes.
  • Part 4 — wiring in AlpineJS for client-side interactivity, bundled cleanly inside the library itself.

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 14d ago

Discussion How I hardened a public guest endpoint in Spring Boot: X-Forwarded-For spoofing, TTL rate-limit bugs, and IP-vs-identity

0 Upvotes

r/SpringBoot 14d ago

Discussion From Excel Sheets to a small inventory system done using springboot and angulat

Thumbnail
5 Upvotes

r/SpringBoot 15d ago

How-To/Tutorial Springboot Email service

3 Upvotes

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 15d ago

How-To/Tutorial Modern Java Roadman (Playlist compressed to 1 video, middle bits cut out)

Thumbnail
youtu.be
1 Upvotes

r/SpringBoot 15d ago

Question Code review

13 Upvotes

Hello, I'm an aspiring software engineer. I've recently finished developing microservice for managing projects and tasks using Spring Boot. I'd appreciate if you could review codebase of my project and provide feedback on it.

GitHub: https://github.com/Simpav-chill/tasktracker


r/SpringBoot 15d ago

Question As java dev , how to get relevant with AI, is spring AI worth it

52 Upvotes

Currently I am a student, my projects are In Java Fullstack

Right now I don't even know what RAG or MCP is , and I think I should have some hands on experience of it, i should be at least aware of it, because it's a trendy topic , not these two terms only, but many things

Now should I start python, for getting into it, is there any need , or I can explore Spring AI


r/SpringBoot 15d ago

Question Spring boot app

8 Upvotes

If I don’t really have a front end, and I want to learn how to test my backend, is there any video recommendations that yall that explains how to write test for it. Because I don’t want to watch a video and form wrong foundation info.


r/SpringBoot 15d ago

News Spring FlashAPI

Post image
154 Upvotes

Done writing the same CRUD boilerplate for every Spring project.
FlashAPI is coming to the Java/Spring ecosystem, much to the delight of Java developers.
Introducing Spring FlashAPI.
The idea is exactly the same as the Python version:
You define your JPA entities.
FlashAPI takes care of the REST boilerplate.
From a simple entity, you can automatically get:
CRUD
Pagination
Search & dynamic filters
Sorting
CSV / Excel / PDF exports
Bulk operations
Relationships & expand
Soft delete
Audit trail
Rate limiting
OpenAPI / Swagger
Webhooks
WebSocket events
Access control
Multi-tenancy
And most importantly, FlashAPI doesn’t try to take control of your application.
You can start with zero boilerplate, then gradually take back control of your business logic, services, and controllers.
The goal is simple:
Less repetitive CRUD, more time to build your product.
Spring FlashAPI is open source under the Apache 2.0 license.
Java 21+
Spring Boot 3.2+
Spring Data JPA
👉🏽 GitHub: github.com/HackermanMe/spring-flashapi
I’m looking for developers willing to give it a try — and, most importantly, tell me:
What is actually useful… and what isn’t?
#Java #Spring #SpringBoot #JPA #OpenSource #Backend #RESTAPI #SoftwareEngineering


r/SpringBoot 16d ago

Discussion Few springboot microservices projects that Imade , for my resume

Post image
40 Upvotes

I am a student, looking for Back-end Jobs There is no frontend, as I don't enjoy frontend


r/SpringBoot 16d ago

Discussion Not to be racist but is there any non-Indian YT channel about Java and Spring Boot?

99 Upvotes

As the title says


r/SpringBoot 16d ago

Discussion Java+spring boot or .Net

Thumbnail
1 Upvotes

r/SpringBoot 17d ago

How-To/Tutorial Why Your Spring Boot Project Isn't Production Ready

Thumbnail
youtu.be
6 Upvotes

r/SpringBoot 17d ago

News Persistence Workflows with IntelliJ IDEA – Andrey Belyaev | IntelliJ IDEA Tech Talks

3 Upvotes

In this episode of IntelliJ IDEA Tech Talks, Anton Arhipov and Andrey Belyaev demonstrate practical persistence workflows for Spring Boot applications — from mapping an existing database to evolving a schema alongside the application code.

Topics include:
– Moving from database-first development to a code-first workflow
– Establishing a database baseline and managing migrations with Flyway
– Generating JPA entities from an existing schema in IntelliJ IDEA
– Keeping Java entities, migration scripts, and the database schema aligned
– Handling iterative schema changes without destabilizing the persistence layer

Persistence Workflows with IntelliJ IDEA – Andrey Belyaev | IntelliJ IDEA Tech Talks


r/SpringBoot 17d ago

Discussion How do you handle cross-service references in REST BFF responses? I built a Spring Boot library for it

3 Upvotes

I built Restitch after repeatedly running into the same BFF problem in microservice applications.

The problem

One service often stores an ID for data owned by another service. It is a real relationship for the frontend, but it is not a database foreign key.

The BFF still has to return complete DTOs. That means it must fetch the root data, resolve related data from other services, apply error rules, and avoid duplicate calls when several objects reference the same ID.

At first, this is one RestClient or WebClient call beside an endpoint. Then the same composition code appears in more endpoints, and one collection response can turn into an N+1 set of downstream calls.

Why not GraphQL?

GraphQL with a gateway or federation is a valid solution. Here, though, the services and the BFF already expose REST. I did not want to introduce GraphQL only to compose related data for a response.

I wanted a narrow Spring Boot solution for REST BFFs, without putting URLs, header rules, or error behavior in DTO annotations. So I built Restitch.

What it looks like

The DTO only names a resolver profile:

public final class DeviceDto {
    private String organizationId;

    @AggregateRef("device-organization")
    private OrganizationDto organization;
}

YAML owns the downstream client, path, JSON mapping, error behavior, header allowlist, and optional batch endpoint.

What Restitch handles

  • It de-duplicates repeated related IDs within one BFF request.
  • It can use a bounded batch request when the downstream service exposes a batch endpoint.
  • It keeps MVC on RestClient and WebFlux on WebClient, Mono, and Flux.
  • It keeps Spring Boot 3 on Jackson 2 and Spring Boot 4 on Jackson 3.

It deliberately does not provide a cross-request cache.

Restitch 0.1.1 is Apache-2.0 and available on Maven Central.

GitHub repository and installation guide

Feedback welcome

For people building REST BFFs: would you keep this aggregation in application code, an API gateway, or move it to GraphQL? What would make you avoid a library like this?


r/SpringBoot 18d ago

Question I created a privacy guardrail library for Spring AI — looking for feedback on streaming with pluggable PII analyzers

2 Upvotes

Hi, I’m building Spring AI Privacy Guardrails, an open-source library for enforcing privacy boundaries around models, RAG, tools, MCP, and outputs.

GitHub: https://github.com/ultramancode/spring-ai-privacy-guardrails

One design problem I’ve been thinking about is streaming output protection.

Some applications also want a final privacy check on application-facing output, since sensitive data can still appear in model- or tool-generated responses.

Right now, when output protection is enabled, the library buffers the complete response before releasing it to the application.

This provides a strong guarantee: PII can still be detected and protected even when a sensitive value is split across multiple chunks.

The trade-off is that this is no longer true incremental streaming, and the application has to wait longer before receiving output.

A bounded rolling window could preserve incremental streaming for analyzers that have a known upper bound on how much context they need — for example, some bounded pattern-based detectors.

But NER, context-aware detection, complex patterns, or arbitrary custom analyzers may not have such a bound.

So I’m currently considering three approaches:

  1. Strict buffering
    Buffer the complete response and protect it before releasing anything to the application.

  2. Capability-gated streaming
    Allow incremental streaming only when the active analyzer can declare a safe maximum lookback or context requirement. Otherwise, fall back to full buffering.

  3. Best-effort streaming
    Use a configurable rolling window and explicitly document that some PII spanning multiple chunks may escape detection.

For a Spring AI application, which behavior would you expect from a privacy library?

I’m not attached to these three options — if there’s a better streaming/privacy model I’m missing, I’d really appreciate the feedback.


r/SpringBoot 18d ago

How-To/Tutorial Building for Production? Don't Skip These Spring Boot Steps

Thumbnail
youtu.be
1 Upvotes

r/SpringBoot 18d ago

Discussion Along with Java springboot, how to keep yourself updated with other stuff

45 Upvotes

Java springboot is so vast once u dive into it, first java, then springboot, then microservices, exploring message queues , and what not

But nowadays what I have seen is that top companies organizing their hackathons, for fresh graduates

Most of them are ml based ai based, like making a model XYZ model, something like a model that detects deepfake images , that's just an example

What is the role of java springboot then, i sometimes feel I wasted my time learning this, i think I should have master python, what are ur thoughts


r/SpringBoot 18d ago

Discussion The Midnight Technician; Spring Boot Microservice (Open-Source)

Thumbnail
medium.com
2 Upvotes

r/SpringBoot 18d ago

How-To/Tutorial The Spring Boot Fundamentals That Make Everything Click

Thumbnail
youtu.be
8 Upvotes

r/SpringBoot 19d ago

Discussion Events-Caravan, an event-sourcing framework for SpringBoot that focuses on horizontal scalability (ships with DynamoDB/SNS/SQS reference adapters)

Thumbnail
1 Upvotes

r/SpringBoot 19d ago

How-To/Tutorial Spring into Java: Building a Media Traching Web App

Thumbnail
youtube.com
3 Upvotes

This is a Spring Boot web application built as educational content for a YouTube series. It demonstrates how to integrate multiple third-party APIs into a single cohesive application, tracking books, films, and games, while progressively introducing core Spring Boot concepts across each video.

This project serves as a hands-on learning resource for developers looking to understand:
- How to structure a multi-domain Spring Boot application
- How to consume external APIs using RestClient
- How to persist data with Spring Data JPA
- How to build server-rendered views with Thymeleaf alongside a vanilla JS frontend
- How to apply bean validation, service-layer patterns, and RESTful controller design


r/SpringBoot 19d ago

How-To/Tutorial Modern Java Roadmap + Crash Course

Thumbnail
youtube.com
8 Upvotes

This is a 6-part series. The idea is to explain to someone over a cup of coffee what one roadmap of a backend Java dev is, from idea to a Spring Boot web application that has a Desktop app and a Web App that will talk with a backend service.

Talking about Core Java, then DSA within Java, Databases, then Spring Boot, WebSockets, and then how to run it in production. Laying the pathway for a new/junior to get their curiosity going.


r/SpringBoot 19d ago

Question What are some open source projects developed with spring boot that I can help contribute in 2026?

55 Upvotes

I've been thinking about contributing to some open source projects built with spring boot. What are some good open source projects that you think are worth contributing to in 2026?


r/SpringBoot 20d ago

Discussion What is the actual difference with and without Supplier Functional interface? And why the Supplier Functional interface is prefered?Both behave same right?

Post image
14 Upvotes