150,676 questions
0
votes
1
answer
29
views
WebSocket SockJS Connection Blocked by Duplicate CORS Headers in Spring Cloud Gateway + Nginx Setup
Problem
I'm getting a CORS error when connecting to a WebSocket endpoint through Spring Cloud Gateway with Nginx as a reverse proxy (it works on my local env without nginx):
Access to XMLHttpRequest ...
0
votes
1
answer
34
views
Springboot v4 GraphQL not making use of custom JsonMapper
I have been working on upgrading SpringBoot microservices from v3.5.7 to v4.0.0. Included in this upgrade is a Jackson upgrade from v2 to v3. The service in question is making a GraphQL request to ...
1
vote
1
answer
90
views
How do I migrate to Spring Boot 4 and maintain Jackson 2?
The guides all emphasize that Spring Boot 4 maintains support for Jackson 2, but I'm attempting the migration right now, and it is causing me all sorts of issues.
I have some custom serialization/...
Tooling
0
votes
3
replies
55
views
AI Tools for Java + Spring Boot + Kafka Stack: ChatGPT Pro or Claude Pro?
I’m thinking of getting an AI plan for work and I’m torn between ChatGPT Pro and Claude Pro.
My stack: Java + Spring Boot + Kafka, microservices, and hexagonal architecture. I’d mostly use it for:
...
0
votes
0
answers
59
views
How to resolve the error 'Unknown property "avatar" in result type "Admin". Did you mean "Id"?' [closed]
I'm using VS Code for coding a Java Spring Boot Project. I use Mapstruct for mapping DTO files, but I have got some errors, and I do not know how to fix those. And I still run the project and do CRUD ...
0
votes
1
answer
38
views
How to fetch recent data from PostgreSQL replica and historical data from ClickHouse based on date range?
I have an application using Java 11 + Spring Boot with two databases:
PostgreSQL Replica DB → contains only recent data (last 24 hours)
ClickHouse → contains historical data (older than 24 hours)
In ...
-1
votes
1
answer
94
views
Failed to initialize JPA EntityManagerFactory: Unable to build Hibernate SessionFactory
I'm new to Java programming and while trying basic programming, I tried to connect java with Mysql Db where i am facing below issue,
Failed to initialize JPA EntityManagerFactory: Unable to build ...
-5
votes
1
answer
82
views
Where should DTO to Entity/ID translation and lookup occur in a multi-layered Spring application? [closed]
I'm building a RESTful API using Spring Boot with a standard layered architecture: Controller (Resource) -> Facade -> Service -> Repository.
I have an incoming Data Transfer Object (...
1
vote
2
answers
62
views
Unable to create a web driver object if the selenium container is stuck in the middle of a session
I have the following piece of code that I use to create web drivers for my Spring Boot application.
public RemoteWebDriver createDriver() {
ChromeOptions options = new ChromeOptions();
URL ...
1
vote
2
answers
67
views
Spring Boot Prometheus Push Gateway: Metrics missing label
In Spring Boot 3.5.6, I switched to the new recommended Prometheus Pushgateway solution.
lang-yaml:
management:
prometheus:
metrics:
export:
pushgateway:
enabled: ${...
0
votes
1
answer
55
views
How to prevent cyclic dependency with sealed interface in java spring boot swagger generation?
Using Spring Boot I've an endpoint which exposes a union type, here is how I wrote it
// Union.ts
import io.swagger.v3.oas.annotations.media.Schema;
@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION)
@...
1
vote
2
answers
121
views
spring-boot-starter-aop jar is missing with Spring Boot 4.0.0
I created a proyect from https://start.spring.io/
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http:/...
Advice
3
votes
1
replies
77
views
SpringBoot 4 RequestBody mapping changes
I have been working on upgrades from SpringBoot 3.5.7 to SpringBoot 4 for various microservices for work and have encountered something odd that I believe I understand the cause but I cannot actually ...
Best practices
0
votes
1
replies
81
views
Best practices for breaking down long methods and modularizing large features in Spring Boot
I’m working on refactoring a legacy codebase with a method that’s grown to several hundred lines.
The method mixes many responsibilities and is difficult to maintain.
Because the codebase is old, I ...
-1
votes
1
answer
88
views
Adding a new HandlerInterceptor causes many existing tests to fail — how to fix or isolate it? [closed]
I have a large Spring Boot application with an extensive test suite (unit tests + controller tests).
After introducing a new HandlerInterceptor, many of my previously passing tests started failing. ...