150,230 questions
Score of 0
1 answer
71 views
How do I manage Mongock / Flamingock data migrations with a rolling Kubernetes deployment? [closed]
We use kubernetes to deploy our services, and our services typically have three or more replicas. This has caused a problem when we want our Spring Boot-initialized Mongock (and soon, Flamingock) to ...
Score of 1
1 answer
75 views
How to log reason Spring Boot tests are not using cached application context?
I have several JUnit 5 integration tests extending one base class. The base declares @SpringBootTest, but Spring appears to start multiple application contexts.
@SpringBootTest(classes = ...
Score of -1
1 answer
123 views
Modeling a hierarchical staff role system alongside a plain customer role: same User entity or split into Customer/Employee? [closed]
I'm building an e-commerce backend in Spring Boot with Spring Security. Currently I have a single User entity that implements UserDetails, used for both customers and staff (admins/managers/employees),...
Score of 2
2 answers
137 views
How should I handle retries when a Spring Boot service provisions a PostgreSQL cluster through a cloud API?
I'm working on a Spring Boot service that provisions PostgreSQL clusters through a cloud provider's API.
The provider's API is asynchronous, so my endpoint roughly works like this:
POST /clusters
...
Score of 0
3 answers
134 views
React App.jsx page not able to make web socket connection with Spring Boot backend
Here is the App.jsx, all the packages are installed:
import React, { useState, useEffect, useRef } from 'react';
import SockJS from 'sockjs-client';
import { Client } from '@stomp/stompjs';
function ...
Score of 0
1 answer
69 views
Where to put SPRING_APPLICATION_JSON when testing Spring Boot application? [duplicate]
I wonder where I should put SPRING_APPLICATION_JSON to be loaded when used with @SpringBootTest?
I originally thought that I could put a file spring.application.json into test resources, but this is ...
Score of 1
0 answers
88 views
Spring Boot REST server generated with OpenAPI generator doesn't find a Jackson pattern validator for a date-time field generated as an OffsetDateTime
I've received an OpenAPI specification that has rules for the format a date-time can have, regarding milliseconds or microseconds precision especially.
I.e. I have this definition for a date-time ...
Score of 4
1 answer
155 views
How to access current attempt count in Spring Boot 4's native for soft vs hard retry limits?
With the native retry support in Spring Boot 4 / Spring Framework, org.springframework.core.retry.RetryPolicy uses a simplified method signature:
public interface RetryPolicy {
boolean shouldRetry(...
Score of -3
0 answers
87 views
How do I know if I will be able to display correctly a country flag on my console log with Unicode characters, from my Spring-Boot application? [closed]
Unicode has set countries flags from regional codes. With two Unicode characters, you make them appearing... "if your console log allows it".
i.e.
\u1F1EB\u1F1F7 should produce the country ...
Score of 4
2 answers
151 views
spring-boot-maven-plugin:start starts multiples instances of my application as wished, but stop only ends one
I have a Spring Boot application that I customize through external properties files.
During Maven's pre-integration-test, I launch three instances of it, through org.springframework.boot:spring-boot-...
Score of 0
0 answers
69 views
How to declare optional Maven dependencies when building Spring Boot auto-configuration with Gradle?
I am writing my own Spring Boot Auto-configuration here https://github.com/moonclipse/raygun-spring-boot.
The starter has optional spring-mvc and spring-ws integration. I write it using Gradle's ...
Score of -2
1 answer
91 views
How does OAuth2AuthorizedClientManager handle concurrent token refresh in Spring Security?
I'm using Spring Boot 4.x / spring-boot-starter-oauth2-client with AuthorizedClientServiceOAuth2AuthorizedClientManager and InMemoryOAuth2AuthorizedClientService using the client-credentials grant.
My ...
Score of 1
0 answers
125 views
Spring Boot 4.1.1 Micrometer tracing context is not propagated via gRPC
I use Spring Boot 4.1.1 with OTEL org.springframework.boot:spring-boot-starter-opentelemetry and gRPC org.springframework.boot:spring-boot-starter-grpc-client/server starters. In my project two ...
Score of 0
0 answers
109 views
Informix Driver for Spring
I am currently using:
<informix-driver.version>15.0.1.4</informix-driver.version>
for my Spring Boot application. I have a bug in combination with another library (APM - Application ...
Score of 1
1 answer
135 views
Custom exception not caught by @RestControllerAdvice [closed]
I have a custom exception QuantityViolationException which I throw from a service method. I have a @RestControllerAdvice with a matching @ExceptionHandler for it, but instead of my handler returning ...