Questions tagged [spring-boot]
Use the Spring Boot tag for questions related to spring boot framework and the features it brings to your Web application. This includes questions about configuration, embedding of the Web servers, setting up metrics, health checks, externalized configuration etc. It does not include questions about the Web server itself, Java code running in your application, or standard spring components. Tag these questions with its own tags to get the best response!
spring-boot
228
questions
-1
votes
0
answers
7
views
Spring Boot JSON Merge Patch map properties to custom type field
In our codebase, we have a class called OptionalOrUndefined
public class OptionalOrUndefined<T> {
@Getter private final boolean defined;
private final T value;
public static <T> ...
0
votes
0
answers
15
views
Proper way to shut down a Spring Boot application after a specific unit of work is completed
I have a number of Spring Boot services that are always running that perform several different kinds of tasks. For example I have one service that is reading from an Azure Service Bus queue using ...
-1
votes
0
answers
6
views
ObservationHandler<ServerRequestObservationContext> does not expose context values to DefaultServerRequestObservationConvention
I am trying to use and extend spring boot's Observation API solution for instrumenting metrics for spring mvc http.server.requests.
I'm trying to add a custom tag, with the key duration, and a value ...
0
votes
0
answers
15
views
OpenAPI Swagger Documentation Jargons
I have configured OpenAPI documentation in my spring boot application. Everything is coming that is expected but there are a lot of jargons coming up. Only the highlighted and ticked values are ...
0
votes
0
answers
8
views
Spring Boot JUnit cannot reset logging context between test classes
In my Spring Boot project, I have test classes where I'm checking for log messages using ListAppender, and they've been working fine. These are like:
@ExtendWith(MockitoExtension.class)
class ...
0
votes
0
answers
17
views
Spring-boot 3 : why oauth2 token endpoint is always returning 401 Unauthorized
I have searched many posts and articles but not found any helpful information. I am using Spring-boot (3.2.6). I am able to generate the token, but when I try with a specific grant_type "...
0
votes
0
answers
13
views
OkHttp Response doesn't have provided body object on the client side
I am writing REST APIs using okhttp library in Spring Boot. I have my OkHttpClient requesting a GET request(client) from another API(server). Both the client and server uses OkHtttp libraries, so I ...
-1
votes
1
answer
17
views
Upload an Excel sheet with huge number of records to a MySql database in the form of a JSON
I have a requirement in Spring Boot project, where I have a huge Excel file with 15-20 sheets, each sheet containing 30,000 rows with an average of 15 columns in each sheet.
My Database is roughly as ...
-1
votes
1
answer
25
views
Spring RestTemplate - How to remove `client_secret` from the logs?
My backend application currently leaks client_secret inside my log file. I would like to keep the log level of DEBUG except for the RestTemplate where I don't want this line to be executed.
The log ...
-2
votes
0
answers
18
views
Using a Bean method result in a static context
I've got a class:
public class SomeBean {
public String getSomeValue() {
return "result";
}
}
I am using this class as a bean:
@Configuration
public class ...
0
votes
1
answer
15
views
Authentication failed while connecting to docker-compose mongodb via springboot application
docker-compose.yml
version: '4'
services:
mongodb:
image: mongo:7.0.5
container_name: mongodb
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: ...
-1
votes
0
answers
11
views
Can't download files content-disposition inline with a POST request from my app after activating CORS on a spring boot 3 application on Chrome/Edge
I'm currently working on a java spring boot (3.2) application with Spring MVC and secured with Spring security.
I wanted to add a CORS configuration on my app but this add a bug on downloading files ...
0
votes
0
answers
6
views
How to use declarative transaction management in spring cloud task with spring batch
Spring boot 2.5.4
My problem is that i dont't succeed in managing transactions : while i annotate my service layer and dao with @Transactionnal, when i have successive dao call in the same service ...
0
votes
1
answer
19
views
Spring controller and processing of parameter string as an array of strings
I encountered this problem. I have a simple spring REST controller that has a get method, it should process a request like this http://localhost:8080/test/get?params=["param1", "param2&...
0
votes
1
answer
25
views
Springboot JPA postgres performance is slow
I have Springboot JPA integration with 2 databases. One is Oracle and the other is postgres 42.6.
I am fetching data from rest-api with 500 records in each request and saving it in postgres. Mostly ...