150,688 questions
0
votes
0
answers
21
views
Spring Boot and Log4J database appender problems
We have a situation where we need to write the logs from an app running in multiple pods on an OpenShift project to the database so I slapped together a quick database logging POC with log4j2, and got ...
0
votes
0
answers
28
views
Angular 20 Router always redirects to "/" whether if I load a full url or if refresh another url
I have developed a small project in Angular 20 using Spring-Boot as my backend (my project does not use nginx).
Every time I refresh my application on any url of the project or load a full url that ...
0
votes
1
answer
25
views
HttpOnly SameSite=None cookie not persisted on mobile, works on desktop
I'm working on a Spring Boot backend with React frontend. I'm setting an HttpOnly cookie for refresh tokens like this:
@NotNull
private ResponseEntity<String> getStringResponseEntity(...
0
votes
0
answers
32
views
Spring Boot @Valid returns just "Bad Request" message instead of my custom message
I just want to get my custom message in Swagger response (not just "Bad Request")
@RestController
@RequestMapping
@RequiredArgsConstructor
public class GenUrlController {
private final ...
Advice
0
votes
0
replies
8
views
Spring Modulith architecture cycle problem
I have a fresh and minimal Spring boot 4 project with Spring Modulith which you can see here.
I have two modules User and Task. A User has zero or more Tasks. Both modules expose a MTO (Module ...
0
votes
0
answers
37
views
ThreadPoolTaskExecutor : on shutdown, threads not awaiting full completion
Problem with Spring's ThreadPoolTaskExecutor, @EnableAsync, AsyncConfigurer, @Async
The context
I have:
a very simple method to run asynchronously :
@Async
public void asyncMethod() {
System.out....
2
votes
1
answer
42
views
Why does Spring's HttpRequestFunction fail with a NoSuchMethodError after upgrading to Spring Boot 4.0.0?
I have a Spring Cloud Stream Application which consumes messages from the RabbitMQ Binder and outputs them to Spring Cloud Function's HTTP Request Function.
It looks like this:
Java code:
@...
0
votes
1
answer
33
views
Why would Spring generate a new CSRF during processing of a POST
I have a Spring app with form-based authentication and a Restcontroller for my API. I am using Spring Boot 3.5.4 and Spring Security 6. If CSRF is disabled in the security configuration, everything ...
0
votes
1
answer
63
views
Spring Boot 3.x – 401 response body is empty when received by another service
We are upgrading Spring Boot from 2.7.0 to 3.5.6 and are facing an issue with error responses between two services.
Setup
Service A → sends a POST request to Service B
Service B → handles ...
1
vote
1
answer
45
views
ClassCastException when using Blaze Persistence EntityViewSpecificationExecutor with Spring Data JPA findOne
I’m trying to integrate Blaze Persistence with Spring Boot 3.5.5 (Java 21, Hibernate 6.2). This is my first attempt to use Blaze in one of my projects, and I’m running into an incompatibility between ...
Advice
0
votes
0
replies
20
views
Best strategy for managing Spring Boot Actuator endpoints at runtime with AOT and caching enabled?
I'm working on a Spring Boot 4.0 project with AOT (Ahead-Of-Time) optimization and AOT caching on the JVM (not native image). This means that during the build, the Actuator endpoints and their ...
-1
votes
0
answers
40
views
Spring Boot fails to start with Milvus Java SDK due to protobuf dependency conflict [closed]
I’m integrating Milvus Java SDK (2.x) into a Spring Boot application, and I’m running into a dependency conflict related to protobuf-java that prevents the application from starting.
Problem ...
-5
votes
0
answers
57
views
After upgrading from spring boot 3.4.11 to 3.5.6 batch jobs are failing [closed]
I am getting the following error when batch job is running. This happens only after the upgrade.
org.springframework.orm.jpa.JpaSystemException: Unable to commit against JDBC Connection
at org....
-3
votes
1
answer
70
views
Unable to mock the repository class object inorder to test the Rest API
I have controller class (ApiController) where service class is autowired (ApiServiceImpl implements ApiService) and where in service class repository class is autowired (ApiRepositoryImpl implements ...
0
votes
1
answer
58
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 ...