r/SpringBoot • u/huseyinbabal • Oct 19 '26
How-To/Tutorial Spring Boot Logging: From Zero to Grafana Loki
Spring Boot Logging: From Zero to Grafana Loki
https://youtu.be/SvvEc8gaeMI
r/SpringBoot • u/huseyinbabal • Oct 19 '26
Spring Boot Logging: From Zero to Grafana Loki
https://youtu.be/SvvEc8gaeMI
r/SpringBoot • u/kparth01 • Oct 17 '26
Most Spring Boot developers I know use Java, but Kotlin has always been an interesting alternative, especially with its concise syntax and null safety.
While experimenting with Kotlin/JVM projects in VS Code, I realized something.
Writing Kotlin was straightforward. Debugging it? Not so much.
I could always switch to IntelliJ, but I wanted to stay in VS Code, set a breakpoint, inspect what was happening, and move on.
That curiosity sent me down a rabbit hole of JVM bytecode, Kotlin inline functions, and source mapping.
Eventually, I ended up building Kotlin Debugger, an open-source VS Code extension that doesn't require a separate Kotlin Language Server.
It's still a work in progress, especially around coroutine debugging, but I'm exploring how to make Kotlin/JVM debugging more convenient for developers who prefer VS Code.
GitHub: https://marketplace.visualstudio.com/items?itemName=kparth01.kotlin-debugger
Curious how many Spring Boot developers here actually use Kotlin? And if you do, are you using IntelliJ or VS Code?
r/SpringBoot • u/pavelbo • Oct 15 '26
v5.0.0 introduces new features to empower your AI agents and close gaps between API definitions and implementations
🤖 For agents:
This release brings bundled MCP tools designed to simplify day-to-day work with Spring Messaging as well as with AsyncAPI documents
Just enable bundled MCP server, register AsyncAPI skill trough Tools -> Install AsyncAPI Agent Skilland, and you are redy to go
⚙️ For architects, engineers, analysts, and API authors:
New Diff feature helps you see which gaps exist between your sources:
- Document against a Apache Kafka broker or cluster
- One Apache Kafka or cluster against another
- Source code against a Apache Kafka broker or cluster (Spring projects only)
- Document against a source code (Spring projects only)
💡 Works across IDEs editions, Community included
Together with not-yet announced Kurkik project, this features lay foundation for self-maintaining API approach
Sound interesting? Open your JetBrains IDE, grab the update and give it a spin: https://plugins.jetbrains.com/plugin/15673-asyncapi/versions/stable/1195232
r/SpringBoot • u/Nervous-Staff3364 • Oct 16 '26
Context: I use Claude Code for Java at work. It starts great. A 30-line CLAUDE.md, clean hexagonal layout, everything respects the boundaries.
Then six months in the CLAUDE.md is 400 lines, the model ignores half of it, and a controller is importing a JPA entity because "it was faster".
At some point I stopped trying to write better prompts. A rule that must always hold shouldn't be a paragraph the model has to remember. It should be something that fails the write.
So I built Nerviz. It's a harness for Spring Boot on Claude Code, and it does three things:
The part I care about most: the generated project carries the whole harness with it, plus its own CI. Whoever clones it doesn't need Nerviz installed.
To keep this from being vaporware, I generated a demo project end to end. It's a bank-app with a green mvn clean verify, and the run took about 20 minutes. The numbers come from the session transcripts, not from me guessing. The approved spec, the partials and the audit report from that run are all public in the repo.
Things it is not: it's not a coding assistant (no model, no editor), not a project template, and not an agent framework. It constrains one agent, it doesn't build agents.
It's MIT and it's early, so there are rough edges. I can't cover every architecture or every way a team uses Spring Boot on my own, and that's why I'm posting. I want contributions. A blueprint for the architecture your team actually uses is a YAML file and changes no prompt, so it's a good first PR. Bug reports, a new rule that should be enforced by a hook, new skill/agent, a doc fix, and "this broke on my machine" issues all help just as much.
I'd also like to know which of the architectures you'd actually use, and which rule you'd want enforced first. I have my own list, but I suspect yours is different.
Repo (issues and PRs welcome): https://github.com/nerviz-ai/nerviz
Site: https://nerviz.dev
r/SpringBoot • u/IntelligentDay4375 • Oct 15 '26
Most web frameworks are built for the public internet: for reach and experiences for strangers. Vaadin is built for the other side of the login. For the data-defined, functionally beautiful and long-lived apps your organization actually runs on.
r/SpringBoot • u/bibb_ekkkk • Oct 15 '26
Im an intern and was assigned a task to segregate the read , read-write queries / methods . The read is supposed to go to port 66 and write on port 67 in the database.
Currently ive defined two db url in yml and have routed every method having read-only using transaction(read-only).
Is this the way to do it or is there any other efficient way.
r/SpringBoot • u/engleangsam • Oct 15 '26
I work with Spring Batch and keep running into the same gap, so I’m trying to learn how other teams deal with it.
Spring Batch is great at the processing itself (chunks, skip/retry, restart). But around it I’ve found almost nothing built in:
BATCH_* tablesFrom what I can tell, Spring Batch Admin is retired and Spring Cloud Data Flow is no longer maintained as open source, so I’m not sure what teams use now.
For those running Spring Batch in production:
I’m not selling anything. I’m researching whether it’s worth building an open-source tool for this, and I’d rather hear real experiences before writing any code. Even a short answer helps, and I’m happy to share a summary of what I learn.
r/SpringBoot • u/Junior_Sign7223 • Oct 14 '26
Hello, i want to learn Java Spring Boot. Can anyone suggets me the best resource for learning java springboot from beginning to advance level that can led me to internship or industry level coding?
I was looking for video tutorial series that has everything for a becoming a java developer include devops work as well.and best for learning as beginner and proceed to advanced topic.
r/SpringBoot • u/huseyinbabal • Oct 13 '26
r/SpringBoot • u/fykup • Oct 13 '26
I've been experimenting with HikariCP connection pool sizing in Spring Boot, particularly what happens to PostgreSQL connections after traffic stops.
One detail that's easy to miss: with Hikari's default sizing, minimumIdle and maximumPoolSize both resolve to 10. Since the idle target equals the maximum, idleTimeout has nothing to retire.
I ran two Spring Boot instances against PostgreSQL 16 on a 1 GiB VM, comparing three configurations:

There was a tradeoff. When traffic returned, median connection acquisition increased from under 3 ms to roughly 200 ms as the pools rebuilt capacity.
The experiment used a deliberately short 10-second idle timeout to make the behavior measurable, not as a production tuning recommendation.
Two repetitions, 2,280 successful workload requests, with recorded data and reproduction instructions.
Full write-up: https://pvrlabs.xyz/articles/spring-boot-jdbc-pool-reclaim.html
Curious how others configure HikariCP when multiple Spring Boot instances share a small PostgreSQL server. Do you generally keep the default fixed-size pools or allow idle connections to retire?
r/SpringBoot • u/OSBY_Glabay • Oct 13 '26
This is something I threw together over a year ago. It was designed to be an easy intro into Microservices since I had noticed lacking in the Spring Boot ecosystem that was something hands-on.
I am remaking it in a monolithic repo as a Spring Modulith project, since I noticed there is also a lack in that area for hands-on learning.
Just looking to share this little project with others who may be curious with no clear picture of where to start with them.
Cheers,
The Midnight Coder
r/SpringBoot • u/Remarkable-Law6564 • Oct 13 '26
Please could u suggest a course of spring ai for beginners ( I experienced full stack apps from scratch with spring)
r/SpringBoot • u/Feisty_Buyer7520 • Oct 12 '26
hii everyone. I have working on learning Spring boot for several months, finishing books such as Spring Start here and got myself into building a project with it. Right now, I am at the stage where I am actively looking out for opportunities to get my first role as a junior developer in Spring boot.
The following link goes to my github project:
https://github.com/Orlanto2100/percy-inventory-mvp
I will be very grateful if you may share your honest feedback on my progress with the project here. I wonder how does it look, what should I improve, and what am I missing? What would it take to getting job ready, apart from other skills such as social skills that can't be accessed here.
I am open to any form of constructive criticisim and willing to learn any advice you offer. Thank you for taking time reading this and super thank you for reviewing the work.🙏🙏
r/SpringBoot • u/ClickOk5811 • Oct 12 '26
Putting this here in case it saves someone an evening. Everything is in the code comments.
public class OrderService {
private final OrderRepository repo;
public OrderService(OrderRepository repo) {
this.repo = repo;
}
// Called from the controller. No here.
public void process(Order order) {
audit(order);
save(order); // <-- looks like it runs in a transaction. It doesn't.
}
u/Transactional
public void save(Order order) {
repo.save(order);
if (order.getTotal().signum() < 0) {
// You'd expect the insert above to roll back.
// When this is reached via process(), it doesn't.
throw new IllegalStateException("negative total");
}
}
}
// Why:
// Spring applies through a proxy that wraps OrderService.
// The controller holds the proxy, so a call from outside goes:
// controller -> proxy -> (starts tx) -> OrderService.save()
//
// But process() calls save() on `this`, which is the raw object, not the proxy:
// controller -> proxy -> OrderService.process() -> this.save()
// ^ no proxy, no tx
//
// And because repo.save() is itself transactional (Spring Data wraps it),
// the insert commits on its own, before the exception is thrown.
// So you end up with a saved row and an exception in the log.The fixes I know of, roughly from least to most invasive:
// 1. Put the annotation on the entry point instead
public void process(Order order) { audit(order); save(order); }
// 2. Move save() into another bean and inject it, so the call goes through a proxy
orderPersistence.save(order);
// 3. Use TransactionTemplate when you want the boundary to be explicit in code
transactionTemplate.executeWithoutResult(status -> repo.save(order));
// 4. AspectJ mode (proxyTargetClass / mode = AdviceMode.ASPECTJ)
// works for self-invocation, but it's a bigger setup changeI’d go with 1 or 2 in most cases. Calling the bean through itself (self-injection) also works, but it reads strangely and I’d avoid it.
One thing I’m not sure about and would like to hear from people: when you hit this in an existing codebase, do you prefer moving the method to a separate service, or restructuring so the transactional boundary sits at the entry point? I can see arguments for both.
r/SpringBoot • u/thisishemmit • Oct 09 '26
We are building an ERP-like platform localized for Moroccan businesses using a modular monolith architecture. The platform currently has more than 11 modules.
Each module contains dozens of features, and each feature may expose dozens of actions. Most actions have a corresponding permission that controls who can execute them.
Features also contain additional product and collaboration rules:
Whether the feature is included in a subscription plan.
Whether the feature is delegable to another workspace.
Whether specific actions are explicitly non-delegable.
Whether an action has quotas or usage limits.
For example, one workspace may authorize another workspace, such as an accounting firm, to perform certain accounting actions on its behalf. However, some sensitive actions must never be delegated.
At the moment, features and permissions are declared as strings in different files and then seeded into the database.
Authorization is performed at the action level, mostly through repeated PostgreSQL queries.
This approach has created several problems:
Typos in feature or permission names can cause silent runtime bugs.
Renaming or refactoring actions can leave old permissions behind.
Adding a new action often requires changes in several different places.
We currently have around 893 permissions, including unused or “ghost” permissions.
There is no reliable guarantee that actions, permissions, features, plan entitlements, delegation rules, and quotas remain synchronized.
Detecting unused permissions requires manual investigation or asking an AI tool to scan the codebase.
So what architecture, patterns, or tooling would you recommend for managing this kind of system?
r/SpringBoot • u/Secure_Vermicelli873 • Oct 09 '26
I'm working on a University Management System using Spring Boot and PostgreSQL. My CRUD APIs were working perfectly before I added the Spring Security dependency. Since adding Spring Security, I've been struggling to get authentication working correctly.
I've configured the username and password in application.properties, and I'm testing the endpoints through Postman using Basic Auth with the same credentials. However, I'm still getting 401 Unauthorized on my POST request, while another request returns 400 Bad Request with the message "User not found OR Nullpointer exception".Cause i handled this exception.
I've already checked the URLs, endpoint names, and credentials multiple times. The application was working before adding Spring Security, and now even after configuring the login credentials, I'm still stuck. I've tried multiple AI coding assistants, including Claude , Codex, and ChatGPT, but I haven't been able to identify the root cause.
I'm trying to understand whether this is a problem with Spring Security's default configuration, my authentication setup, or my application's user lookup logic.
Additional context:
application.propertiesI've attached screenshots showing the requests and responses.
What should I check first to identify the actual root cause? If you need my SecurityConfig, application.properties (with credentials redacted), user entity, UserDetailsService, or controller/service code, let me know.
r/SpringBoot • u/ClickOk5811 • Oct 09 '26
Adding an index is the usual first suggestion when an endpoint is slow, and sometimes it’s right. I’d count queries first.
Turn on SQL logging for a single request (logging.level.org.hibernate.SQL=DEBUG) and count the lines. A page of 50 orders that fires 51 selects, one for the list and one per row for a lazy association, is a different problem from one slow query. An index on the join column doesn’t change that count. Every query can be fast and the endpoint still crawl.
Keep the logging on for the whole request, not just the service method. If the controller returns entities directly, Jackson can walk lazy relations during serialization, and with spring.jpa.open-in-view on (the default) those selects will happen after your service code is long finished.
If the count looks sane, run EXPLAIN on the SQL Hibernate printed, not the query you assume it generated. Those differ more than you’d expect once derived query names get long or Specifications are involved.
Indexes come after that. If the count was the problem, the fix is usually a join fetch, or a projection that only selects the columns the endpoint returns.
I’d reorder this for a reporting endpoint that runs one heavy query, where the plan is the first thing to look at. For ordinary list endpoints the count check takes two minutes and rules out a whole class of problems.
r/SpringBoot • u/Aggravating-Spite844 • Oct 08 '26
Hey guys,
So I've been getting this urge to create a clearer doc for Spring security particularly, it was very hard for me and I had alot of entanglements I had to resolve by myself, tutorials weren't doing justice, the docs wasn't really beginner friendly, and the course that explained well was a "paid" course.
This is just a kind of validation from the community, should I go ahead to build this, do you guys this would be useful, not just to beginners but to gurus who just want to make reference to a concept they probably forgot.
Please what do you guys think?
r/SpringBoot • u/pronto_perez • Oct 08 '26
Hey everyone,
I'm starting my journey with Java Spring Boot development and I'm setting up my workspace in VS Code.
A few details about my preferences and setup:
Since I'm completely new to Spring Boot, I'd love to know: Which essential extensions should I install in VS Code to get the best developer experience?
Are there specific tools for Spring Boot project creation, debugging, database management, or live reloads that you consider must-haves?
Thanks in advance for your tips!
r/SpringBoot • u/No-Competition2427 • Oct 07 '26
I'm the author. I built a small starter to remove a chore I kept redoing on Spring Boot projects: writing a dev-database seed script, then fixing it every time the schema changed.
The usual pain: Faker/Datafaker generate realistic values, but they don't know that Payment needs an existing Counterparty. So you hand-write "create parents, keep the IDs, wire them into children", and it breaks the next time a constraint or relationship changes.
SynthForge reads the entity instead. You annotate it:
Then enable it for the profiles you want, never production:
synthforge:
enabled-profiles:
Start the app in one of those profiles and both tables are filled in dependency order. There is no calling code.
Spring-specific details
io.github.thembatman0:synthforge-spring). Seeding runs at startup in an ApplicationRunner.synthforge.enabled-profiles.@ManyToOne/@OneToOne relationships topologically, so parents are saved first.@NotNull, @Size, @Email and field-name heuristics. @Column(unique = true) fields get a bounded retry loop.synthforge.seed gives identical data every run.Limits: V1 skips @OneToMany/@ManyToMany and composite keys. It is a 0.1.0, and as far as I know it has no outside users yet.
How it differs from Instancio: Instancio (and instancio-jpa) is an API you call inside a test to build a graph. SynthForge runs by itself at startup, so it's closer to a dev-database seeder than a test helper.
Things I'd like to hear from you:
@Seed on your entity classes, or do you prefer keeping seeding out of the domain model?CommandLineRunner plus Datafaker already good enough for you?r/SpringBoot • u/veerendra2 • Oct 07 '26
configstream is a library for Spring Boot services that already use MongoDB. Feature flags and config live in a collection, get cached in memory, and any change is pushed to every running instance within about a second via MongoDB Change Streams.
configstream.yml manifest, with typed constants generated at compile timeLimits: MongoDB only for now (Postgres planned), pre-1.0, no percentage rollouts or A/B testing.
https://github.com/configstream/configstream
Feedback welcome