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
67
questions
0
votes
0
answers
7
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
6
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 ...
0
votes
0
answers
6
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 ...
0
votes
0
answers
13
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 ...
-1
votes
0
answers
11
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
12
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: ...
0
votes
0
answers
10
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
2
answers
18
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
18
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 ...
0
votes
0
answers
8
views
Nested Interface Projections in Spring Data JPA
I am working on a spring boot based application where I want to utilize interface based projection as I want to select partial column from my mysql database.
I have a CourseEntity.java class with a ...
1
vote
1
answer
15
views
mvn verify doesnt start docker-compose
I want to start docker-compose upon integration tests e.g mvn verify command.
I am using:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId&...
0
votes
0
answers
15
views
Memory Leak while persisting bulk data
I am importing a lot of data from a csv, transform it to list of objects and write it to the database. This is working fine but it seems to have a memory leak.
The problem is that the memory does not ...
0
votes
0
answers
24
views
How to catch the PSQLException exception?
How to catch the **PSQLException ** exception? I am using Spring boot JDBCTemplate and it can throw a PSQLException exception. Using try-catch, I get this message from IDEA: "Exception 'org....
-1
votes
1
answer
34
views
Best Practices for Validation in a Spring Boot Application [closed]
In my Spring Boot application, I have encountered a scenario where multiple services interact with each other, and objects passed between them need to be validated. Currently, I am using @Valid in the ...