r/SpringBoot • u/rodolfo-mendes • May 14 '26
How-To/Tutorial Introduction to Spring AI
r/SpringBoot • u/rodolfo-mendes • May 14 '26
r/SpringBoot • u/leetjourney • May 13 '26
Hello, I thought I’d share the latest course I’ve created, which is aimed at beginners.
It covers basics all the way to “intermediate” concepts regarding Spring Boot. As learning base I show you how to build a Task Manager Rest API.
Here’s the course link:
Hope someone finds it useful!
r/SpringBoot • u/Oofcito • May 12 '26
hey everyone! so i've been practicing spring security's more advanced concepts (jwt with oauth2) with the help of claude code, and i was curious as to how other people have approached this. to give context: my 'app' uses jwt access and refresh tokens (utilizing cookies), and oauth2 where a frontend would redirect to the spring security generated oauth2 endpoint for whatever provider is chosen by the frontend (with my app, it would be google), so my backend would be the 'client'.
when i started reading other people's code and discussions about it however, i saw that that would be how it would work for a BFF framework. what I was intending to do was make it so it could be utilizable in future SPA apps i may build. now, i'm sitting here and really doubting if my code is an acceptable approach at all. please do keep in mind that some of the oauth2 code was generated (in part) by claude as i didn't know where to start with oauth2 unlike for JWT. i also didn't exactly know much about oauth2 beforehand (which likely is a bad idea lol) and anything i know about it is because i asked claude as i went through with making this app.
i would really appreciate if someone could go over some of my code and give me some feedback as i know llms tend to hallucinate and i need a human opinion as i'm still learning spring boot :)
r/SpringBoot • u/Huge_Road_9223 • May 12 '26
So, I just want everyone to know that I am looking at YT videos, Stack Overflow and other Google Searches before I come here.
So, I am just starting with Claude as you know, though I do have many yoe with Java/SpringBoot. I find that Claude Code will help me with a lot of boilerplate stuff, and I'll do the rest myself for complex business logic.
I used IntelliJ to create a new Spring Boot project. I pulled in what I needed, and I was able to build this project and run it although there was nothing in it yet.
The CLAUDE.md file I created from another repo I ws looking at, and that is in my GH now. I modified the file, so it's pretty narrow from what I initially checked-in. I understand, I create this file in the root of my SpringBoot app, and it tells Claude what the rules are. So, I did this first, and this is the file I have in my IDE (intelliJ).
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
Spring Boot 4.0.6 phone book application using Java 21, MySQL, Thymeleaf + HTMX for the UI, GraphQL API, Spring Security, and Spring AI (Anthropic Claude integration).
- **Group ID / base package**: `org.something.opensource.phonebook`
- **Artifact ID**: must match the parent directory name (`Claude_Phone_Book`)
- **Database**: MySQL (`phonebook_db`, port 3306, user `myuser`)
## Build & Run Commands
```bash
# Build (skip tests)
./mvnw clean package -DskipTests
# Run application
./mvnw spring-boot:run
# Run all tests
./mvnw test
# Run a single test class
./mvnw test -Dtest=MyServiceTest
# Run a single test method
./mvnw test -Dtest=MyServiceTest#myMethod
```
## Architecture
This is a **feature-oriented** Spring Boot service. Code is organized by feature, not by layer. Each feature owns its controller, service, repository, entity, and tests.
### Key layers
| Layer | Location | Notes |
|--------------------|----------------------------------------|----------------------------------------------|
| Domain entities | `src/main/java/.../domain/` | JPA entities only |
| Feature packages | `src/main/java/.../feature/<name>/` | Controller + Service + Repository per feature|
| Thymeleaf templates| `src/main/resources/templates/` | Server-rendered HTML fragments with HTMX |
| GraphQL schema | `src/main/resources/graphql/` | `.graphqls` schema files |
### UI pattern (Thymeleaf + HTMX)
Controllers return Thymeleaf template names or `th:fragment` partials swapped in by HTMX. Use `htmx-spring-boot-thymeleaf` (`HtmxRequest`, `HtmxResponse`) for HTMX-aware responses. Prefer partial fragment returns for HTMX requests over full-page reloads.
### GraphQL
Resolvers are annotated with `@QueryMapping`, `@MutationMapping`, or `@SubscriptionMapping`. Schema files live under `src/main/resources/graphql/`.
### Spring AI (Anthropic)
Configured via `spring-ai-starter-model-anthropic`. Inject `ChatClient` or `AnthropicChatModel` into services. Model and API key are set in `application.properties` (or environment variables — do not hardcode keys).
## Project Rules
- **No Lombok** — use plain Java records, constructors, and accessors.
- **Latest dependency versions** — always bump to latest stable on each change.
- **Semantic versioning** — bump the PATCH version in `pom.xml` on every change.
- **Tests required** — both positive and negative test cases for all new code.
- **Minimize generated code** — only what the feature needs.
- **Docker Compose** — maintain `docker-compose.yml` for MySQL and any other infrastructure.
- **README.md** — update on every version bump.
## Database Naming Conventions
- JPA entities: `PascalCase` with `Entity` suffix (e.g., `ContactEntity`, `PhoneNumberEntity`).
- Use `@Table(name = "...")` when the table name differs from the class name minus `Entity`.
- Do **not** use `@Entity(name = "...")` to rename the logical entity unless strictly necessary.
- Annotations from `jakarta.persistence.*`; fields use camelCase, columns use snake_case.
- Database config: `src/main/resources/application.properties`
So, in IntellIJ I ran Claude plugin which opens the terminal in intelliJ, and everything seemed to be fine. It seems in order to let CC know what exists, you run the /init command. Which I did, and it looks like it created a bunch of tokens. Now, I presume I do NOT need to do this all the time unless I make changes that it doesn't know about. My goal is to NOT let CC do everything, but some stuff, and then I will manually do the more complex business logic.
Now, I want to start small. From the research I already did. CC should know there is an application.propeties file in the /src/main/resources directory, and it can get access to the database from there.
So, I am presuming I just need to do some prompt such as:
Read src/main/resources/application.properties to understand my database configuration. Based on those settings, create Hibernate/JPA entities for all tables, except the system tables. Include proper JPA mapping (@Entity, u/Table, u/Id, etc.), and create them in the com.something.opensource.domain package."
Then it asks me for a lot of permissions and constantly reminding me that I can create a PERMISSIONS.md file so that these do not have to get asked all the time.
My next step would then be the following:
to do the CRUD business logic for Services
create the controllers
create unit tests for the Repository, business logic Services, and Controllers
create the Swagger/OpenAPI documentation
Does this make sense? From a video I was watching, it was possible to combine steps 1 and 2 into one command, but again, I want to start slow.
I haven't seen a lot of examples on the internet yet on how to do a lot of this, and the YT videos aren't extensive either. so I feel like this is something new, but is starting to gain ground.
Anyway, if anyone can be of help, that would be much appreciated.
r/SpringBoot • u/Status_Camel2859 • May 12 '26
I'm trying to understand how Hibernate behaves in different situations. Does anyone know of any good resources or quick tests I can run to better understand how it works?
Right now Im specifically trying to understand lazy loading behavior.
Suppose we have 3 entities: organization -> department -> employee
ManyToOne relationship with Organization.ManyToOne relationship with Department.Case 1: Load departments first, then employees.
In this case, I'm able to navigate from Employee -> Department (e.getDepartment().getId()) without triggering additional queries.
List<Department> departments =
departmentRepository.findAllByOrganizationId(organizationId);
List<Long> deptIds = departments.stream()
.map(Department::getId)
.toList();
List<Employee> employees =
employeeRepository.findAllByDepartmentIdIn(deptIds);
// No additional queries triggered
Map<Long, List<Employee>> groupedById =
employees.stream()
.collect(Collectors.groupingBy(e -> e.getDepartment().getId()));
// No additional queries triggered
Map<String, List<Employee>> groupedByName =
employees.stream()
.collect(Collectors.groupingBy(e -> e.getDepartment().getName()));Case 2: Load only employees.
Now, accessing e.getDepartment().getId() does not trigger queries, but accessing e.getDepartment().getName() does.
List<Long> deptIds = List.of(1L, 2L, 3L);
List<Employee> employees =
employeeRepository.findAllByDepartmentIdIn(deptIds);
// No additional queries triggered
Map<Long, List<Employee>> groupedById =
employees.stream()
.collect(Collectors.groupingBy(e -> e.getDepartment().getId()));
// Triggers N+1 queries
Map<String, List<Employee>> groupedByName =
employees.stream()
.collect(Collectors.groupingBy(e -> e.getDepartment().getName()));Is this behavior consistent and expected in Hibernate?
How should I think about this internally so I can predict and plan for these situations properly?
r/SpringBoot • u/Prestigious-Bee2093 • May 11 '26
Hey everyone, a few weeks ago I shared UIGen - a CLI that turns your OpenAPI spec into a full React App at runtime. I've been iterating based on feedback and adding features that make it useful for real worl apps.
Recently added OAuth support and environment variable resolution based on feedback.
x-uigen-auth annotation
Add OAuth authentication to your app declaratively. Supports Google, GitHub, Facebook, and Microsoft. The runtime handles the complete OAuth flow - authorization, token exchange, refresh, and session management.
info:
x-uigen-auth:
providers:
- provider: google
clientId: ${GOOGLE_CLIENT_ID}
redirectUri: ${GOOGLE_REDIRECT_URI}
scopes:
- openid
- email
- profile
Environment variable resolution
Reference environment variables in your config using ${VAR_NAME} syntax. UIGen loads .env files from your spec directory and resolves variables at build time. Supports default values with ${VAR_NAME:default}.
x-uigen-auth:
providers:
- provider: google
clientId: ${GOOGLE_CLIENT_ID}
redirectUri: ${GOOGLE_REDIRECT_URI:http://localhost:8000/callback}
The Meeting Minutes example(in the repo) demonstrates OAuth with Google. Set up your OAuth credentials, add them to .env, and UIGen handles the rest.
# .env file
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_REDIRECT_URI=http://localhost:8000/api/v1/auth/google/callback
# Run the app
Not a Spring Boot example but the spec should be exactly what you'd get from Spring Boot, conributions welcome for more examples.
The OAuth flow works end-to-end - click "Sign in with Google", authorize, and you're redirected back with a valid session. Token refresh happens automatically on 401 responses.
A lot other extensions have been added, feel free to explore the below.
For functionality needing complex frontend flows, I am working on an extension system that will dynamically load this extenstions.
Repo: https://github.com/darula-hpp/uigen
Docs: https://uigen-docs.vercel.app
Feedback welcome.
r/SpringBoot • u/RecognitionIcy975 • May 11 '26
The auth service is working perfectly on its independent api
But when I connect it to the api gateway it gives a 404 error I have tried everything and changed the application.properties multiple times but no solution.The spring version is 4.0.6 and the cloud version is 2025.1.1
Help me please
r/SpringBoot • u/andrewarellano1082 • May 12 '26
Hello i am creating a multi Tenant Datamask Spring Boot Api to host on Render and publish on RapidAPI from creating different branches for Development, Staging and Production and i have been in the Development branch of making this for 2 years now due to going between back and fourth of what Spring Boot Dependencies/tools should i remove and keep also i'm a solo programmer doing this and a overthinker when it come to creating software for real world use so here is the Spring Boot Dependencies/tools that i currently have listed
// spring boot dependencies
Spring Web
Spring Boot Actuator
Spring Data JPA
H2 Database
Spring Security
Spring Rest Docs
MySQL connector
Flyway dependencies
Spring OAuth2 resource server dependencies with jtw token
Spring validation
Spring cache abstraction
Spring Boot Redis for cache
Spring boot Micrometer
GitHub Action
Spring Boot Admin(Server)
Spring Boot Admin(client)
Spring Boot email
Prometheus(for later scaling)
// Tools via docker and Render
Render Prometheus(for later scaling)
OWASP ZAP docker image only(stage branch) for Api load testing
Proxysql docker
Jmeter docker image manually later on add it to docker compose if testing daily/weekly(stage branch) for Api load testing
WireMock docker compose (stage branch) for Api load testing
Render MySQL(stage branch and production branch)
r/SpringBoot • u/minimal-salt • May 10 '26
ive done node for a couple of backend projects, a small service in go, played with rust for a side thing. theyre all fine, genuinely
but every time im starting something that actually has to ship and be debuggable in 2 years when im not on the team anymore, i reach for spring boot again. ive been doing this long enough to know its not just inertia
the reason is predictability. when something breaks at 2am i know where to look. theres always a controller, always a service, always a config class, the actuator tells me whats happening, spring security has the same shape it had 5 years ago. its boring in the exact way production systems should be boring
with node you can have 4 projects at the same company that look completely different. with go you write everything yourself which is fine until you onboard someone. with rust "the right way" still changes every 18 months. spring boot has been mostly the same since 2016, the answer to most "how do i do X" questions is on stackoverflow from 2018 and still works
i know its verbose. but the verbosity is mostly metadata, its telling future-you what the code does without having to read every line
(actuator alone is worth half of why i pick it. health checks, metrics, thread dumps, standardized across every spring app, i can debug any spring service even if ive never seen it before)
i went and tried the alternatives partly to escape spring boot. trying them made me more convinced its the right answer, not less
r/SpringBoot • u/Status_Camel2859 • May 11 '26
From a proper architectural point of view, what’s the best way to handle parent/child entity services?
This might sound like a beginner question, but I’m trying to improve my backend design skills and would appreciate guidance from more experienced developers.
Suppose we have 3 entities: organization -> department -> employee
ManyToOne relationship with Organization.ManyToOne relationship with Department.So consider 3 services and repositories, with each service containing its own repository:
OrganizationService + OrganizationRepositoryDepartmentService + DepartmentRepositoryEmployeeService + EmployeeRepositoryDepartmentService depend on OrganizationService (to fetch/validate the Organization. Basically DepartmentService contain OrganizationService too)?EmployeeService depend on DepartmentService?Is this the standard approach? Or is it better to introduce something like a facade/application layer that orchestrates these operations and passes required entities down to the services?
Possible approaches I can think of:
Approach 1: Parent services directly depend on child services for cascading deletes. Example:
OrganizationService -> DepartmentService (Basically OrganizationService contain DepartmentService too)DepartmentService -> EmployeeServiceOneToMany + CascadeType.REMOVE / orphan removal) and let Hibernate handle child deletion automatically.What is generally considered the cleaner architectural approach?
OneToMany relationships everywhere they’re needed for synchronized operations (create/update/delete), or only when navigation from parent to child is actually required?Would appreciate insights on how this is typically handled in real-world backend applications.
r/SpringBoot • u/Cautious_Presence_73 • May 10 '26
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 • u/Aggressive_Science_5 • May 10 '26
Hey everyone, I'm losing my mind with this issue.
I have two Spring Boot projects — one using MySQL and one using PostgreSQL. I've been trying to set database credentials using setx in Windows CMD, but IntelliJ keeps picking up old values even after restarting.
The problem:
setx DB_USERNAME postgres, the app still tries to connect as rootapplication.properties, I still get Access denied for user 'root'@'localhost'What I've tried:
setx DB_USERNAME and setx DB_PASSWORD multiple timesapplication.propertiesspring.batch.jdbc.initialize-schema=neverEnvironment:
Has anyone faced this? How do I force IntelliJ/Spring to actually use the credentials I set?
Everything was woring fine until i started my new mysql project

2026-05-10T16:15:52.211+05:30 ERROR 19808 --- [user-service] [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/hibernate/autoconfigure/HibernateJpaConfiguration.class]: Unable to build Hibernate SessionFactory [persistence unit: default] ; nested exception is org.hibernate.exception.AuthException: Unable to open JDBC Connection for DDL execution [FATAL: password authentication failed for user "root"] [n/a]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1817) \~\[spring-beans-7.0.6.jar:7.0.6\]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:603) \~\[spring-beans-7.0.6.jar:7.0.6\]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:525) \~\[spring-beans-7.0.6.jar:7.0.6\]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:333) \~\[spring-beans-7.0.6.jar:7.0.6\]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:371) \~\[spring-beans-7.0.6.jar:7.0.6\]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331) \~\[spring-beans-7.0.6.jar:7.0.6\]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:201) \~\[spring-beans-7.0.6.jar:7.0.6\]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:977) \~\[spring-context-7.0.6.jar:7.0.6\]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:621) \~\[spring-context-7.0.6.jar:7.0.6\]
at org.springframework.boot.web.server.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) \~\[spring-boot-web-server-4.0.5.jar:4.0.5\]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:756) \~\[spring-boot-4.0.5.jar:4.0.5\]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:445) \~\[spring-boot-4.0.5.jar:4.0.5\]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) \~\[spring-boot-4.0.5.jar:4.0.5\]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365) \~\[spring-boot-4.0.5.jar:4.0.5\]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) \~\[spring-boot-4.0.5.jar:4.0.5\]
at com.example.user_service.UserServiceApplication.main(UserServiceApplication.java:10) \~\[classes/:na\]Caused by: jakarta.persistence.PersistenceException: Unable to build Hibernate SessionFactory [persistence unit: default] ; nested exception is org.hibernate.exception.AuthException: Unable to open JDBC Connection for DDL execution [FATAL: password authentication failed for user "root"] [n/a]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:448) \~\[spring-orm-7.0.6.jar:7.0.6\]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:411) \~\[spring-orm-7.0.6.jar:7.0.6\]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:419) \~\[spring-orm-7.0.6.jar:7.0.6\]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1864) \~\[spring-beans-7.0.6.jar:7.0.6\]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1813) \~\[spring-beans-7.0.6.jar:7.0.6\]
... 15 common frames omittedCaused by: org.hibernate.exception.AuthException: Unable to open JDBC Connection for DDL execution [FATAL: password authentication failed for user "root"] [n/a]
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:87) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:34) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:115) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:101) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl.getIsolatedConnection(DdlTransactionIsolatorNonJtaImpl.java:71) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl.getIsolatedConnection(DdlTransactionIsolatorNonJtaImpl.java:37) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.tool.schema.internal.exec.ImprovedExtractionContextImpl.getJdbcConnection(ImprovedExtractionContextImpl.java:61) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.tool.schema.extract.spi.ExtractionContext.getQueryResults(ExtractionContext.java:41) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.extractMetadata(SequenceInformationExtractorLegacyImpl.java:36) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.initializeSequences(DatabaseInformationImpl.java:73) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.<init>(DatabaseInformationImpl.java:63) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.tool.schema.extract.internal.CachingDatabaseInformationImpl.<init>(CachingDatabaseInformationImpl.java:43) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.tool.schema.internal.GroupedSchemaMigratorImpl.buildDatabaseInformation(GroupedSchemaMigratorImpl.java:112) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:83) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:269) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$1(SchemaManagementToolCoordinator.java:101) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at java.base/java.util.HashMap.forEach(HashMap.java:1430) \~\[na:na\]
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:100) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.boot.internal.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:35) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:33) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:323) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.internal.SessionFactoryRegistry.instantiateSessionFactory(SessionFactoryRegistry.java:64) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:437) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1456) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:93) \~\[spring-orm-7.0.6.jar:7.0.6\]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:443) \~\[spring-orm-7.0.6.jar:7.0.6\]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:436) \~\[spring-orm-7.0.6.jar:7.0.6\]
... 19 common frames omittedCaused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "root"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:778) \~\[postgresql-42.7.10.jar:42.7.10\]
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:234) \~\[postgresql-42.7.10.jar:42.7.10\]
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:289) \~\[postgresql-42.7.10.jar:42.7.10\]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:57) \~\[postgresql-42.7.10.jar:42.7.10\]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:290) \~\[postgresql-42.7.10.jar:42.7.10\]
at org.postgresql.Driver.makeConnection(Driver.java:448) \~\[postgresql-42.7.10.jar:42.7.10\]
at org.postgresql.Driver.connect(Driver.java:298) \~\[postgresql-42.7.10.jar:42.7.10\]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:144) \~\[HikariCP-7.0.2.jar:na\]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:373) \~\[HikariCP-7.0.2.jar:na\]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:210) \~\[HikariCP-7.0.2.jar:na\]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:488) \~\[HikariCP-7.0.2.jar:na\]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:576) \~\[HikariCP-7.0.2.jar:na\]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:97) \~\[HikariCP-7.0.2.jar:na\]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:111) \~\[HikariCP-7.0.2.jar:na\]
at org.hibernate.engine.jdbc.connections.internal.DataSourceConnectionProvider.getConnection(DataSourceConnectionProvider.java:137) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:508) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]
at org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl.getIsolatedConnection(DdlTransactionIsolatorNonJtaImpl.java:44) \~\[hibernate-core-7.2.7.Final.jar:7.2.7.Final\]r/SpringBoot • u/Old_Treat_5596 • May 08 '26
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 • u/jdev_soft • May 08 '26
Recently I jumped into a legacy project written in Grails and using Oracle database. We decided to migrate either to Spring Boot or Qurakus in order to modernize the backend stack.
The Oracle database is huge (TB) and one cannot simply port the entire db to a local container. However I want to have at least a small part or slice of the database on my local dev setup for specific tests.
For example, imagine that I am working on an Employee domain CRUD feature. I want to quickly spin up a "similar to prod" Oracle database setup for employees table and perform tests.
I have Testcontainers setup with oracle 23 slim image but I feel the live reloading is slow.
What is the best configuration for live reloading? Arconia Dev Services looks interesting.
My feeling is that Quarkus dev services is way far superior for dev local containers and live reload that improve the dev experience a lot.
Although I think migrate Grails to Spring Boot feels more natural than Grails to Quarkus the dev experience on Quarkus is better...
r/SpringBoot • u/Frosty-Pear-6080 • May 08 '26
Hi all
I'm working on my own spring boot library, like plug and play.
The library interally has entity and repository classes.
How can i register the entity and repository classes via autoconfig
Note I'm using spring v4
r/SpringBoot • u/rodolfo-mendes • May 08 '26
r/SpringBoot • u/ThemeHopeful7094 • May 07 '26
I run MoWave One, a productivity SaaS that recently crossed 25,000 users. Built initially on Postgres + Auth + Node.js Serverless Functions.
After 8 months and a growing user base, the serverless functions started feeling cramped — no proper domain modeling, awkward testing, no module boundaries, and one of them was literally a stub that I'd forgotten to finish (yep, our Stripe webhook).
Decided to migrate the backend to Spring Boot 3.4 + Java 21.
Stack:
- Spring Boot 3.4 + Java 21 LTS (Corretto)
- PostgreSQL via JDBC (HikariCP)
- Spring Security 6 validating JWTs via JWKS
- Flyway 10 for schema migrations
- Redis (Valkey) for webhook idempotency
- Modular monolith with Hexagonal Architecture
Some early lessons:
I'm 4 modules into a 16-module migration managed via Maven. Happy to answer questions about the architecture, the migration approach, or anything Spring-related.
r/SpringBoot • u/olivergierke • May 07 '26
r/SpringBoot • • May 07 '26

One aspect I found interesting in Spring Agent Flow is the attempt to model multi-agent orchestration using familiar Spring patterns instead of building everything around prompt chaining abstractions.
The project exposes practical concerns that usually get ignored in demos:
- agent coordination
- workflow state management
- task routing
- shared memory/context
- human approval flows
- observability in long-running workflows
Live demo:
https://huggingface.co/spaces/datallmhub/multi-agent-customer-ops
Repo:
https://github.com/datallmhub/spring-agent-flow
I’m curious how other teams are handling orchestration complexity once moving beyond single-agent systems.
r/SpringBoot • u/PuddingAutomatic5617 • May 07 '26
Most RAG implementations I see are just `PDF -> Embeddings -> Similarity Search -> Hope`. That doesn't work for production-grade microservices where data is structured, messy, and lives in JSON catalogs or Markdown docs.
I’ve been working on a **Spring Middleware AI** to treat RAG as a first-class citizen in the Spring ecosystem.
**Key features of this architecture:**
* **Deterministic Retrieval:** The system distinguishes between "I don't know" (no data found) and actual knowledge. No more LLM hallucinations when the context is missing.
* **Reactive ETL Pipelines:** Indexing and transforming ~8,000 data points (JSON/Markdown) into Qdrant in 80 seconds using a reactive stack.
* **Complex Query Planning:** It handles non-trivial questions like *"Which products appear in >1 catalog with 3+ positive reviews?"* by converting natural language into structured retrieval plans (filters + semantic search).
* **Agnostic Backend:** Works with **Ollama** for local inference or OpenAI for cloud, keeping the infrastructure declarative.
**The Tech Stack:**
* Java / Spring Boot (Reactive)
* Qdrant (Vector DB)
* Ollama / OpenAI
* JSON & Markdown sources
The goal is to move away from "chatting with docs" and move towards **AI-native infrastructure** that any enterprise can plug into their existing microservices in an afternoon.
I'd love to hear your thoughts on the ETL vs. Embedding trade-off. In my experience, the quality of the RAG depends 90% on how you transform the data before it hits the Vector DB.
Video: https://youtu.be/TrIWxLxs2nI?is=DnY0YZiPBhGwRD1a
**What do you guys think?**
r/SpringBoot • u/dev-dp24 • May 07 '26
I built a prototype for offline UPI payments using Bluetooth mesh networking.
The idea started with a simple question:
What happens when UPI works perfectly… except the internet doesn’t?
India has 600M+ UPI users, but connectivity still drops constantly:
So I tried building a system where payment packets can travel phone-to-phone over Bluetooth until any device in the chain gets internet access.
How it works:
A few security/design details I enjoyed working on:
Built the demo using:
Spring Boot 3, H2, Bluetooth mesh simulation, RSA-2048, AES-256-GCM, and a live dashboard showing packets hopping across 5 virtual devices.
This is obviously not production-ready UPI infrastructure 😄
But it was a fun systems/security experiment exploring:
Would love feedback on the protocol design or edge cases I may have missed.
https://www.linkedin.com/feed/update/urn:li:activity:7458085814191804417/
r/SpringBoot • u/rodolfo-mendes • May 07 '26
r/SpringBoot • u/Entire-Position9690 • May 06 '26
Spring Idempotency Kit is a production-ready library that ensures methods execute exactly once per unique key — preventing duplicate operations in distributed systems.
Problem it solves: Retries, timeouts, and concurrent requests cause duplicate executions. Double charges, repeated orders, webhook duplication. This library eliminates that.
All you do:
public PaymentResponse
The library handles:
Built by Atlancia Labs