216 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
71
views
Spring boot 3.4.x OIDC2.0 - Try to ignore SSL validation, but not working and throws exception - DNS not matching
Trying create an Oauth 2.0 browser flow by using spring-boot 3.x (3.4.11) spring-framework 6.x application.
authorization_code has generated. Then "restTemplate" call to make the token is ...
0
votes
0
answers
152
views
Checkmarx issue(SSRF) on queryparam String
Our controller looks like this:
public ResponseEntity<ServiceResponse<List<String>>> getItemIdentifiers(
@RequestParam(required = true) String category_,
@...
2
votes
2
answers
4k
views
Spring Boot 3.4 new feature : How to config SSLBundle works with RestClient?
I am using Spring Boot 3.4.1 , JDK 23, MySQL 9. I am excited with new feature RestClient inside new Spring Framework version . I can done mutualTLS with RestTemplate without any concern, now I want ...
1
vote
0
answers
563
views
How to Resolve servletRequest cannot be null error for OAuth2 RestTemplate Interceptor in Spring Batch?
I'm trying to replace the deprecated OAuth2RestTemplate with a custom interceptor approach for adding an x-access-token header using the ClientHttpRequestInterceptor in Spring Batch. My goal is to ...
0
votes
0
answers
47
views
How can you build a URI in Java that has a path segment fully URL encoded?
I'm trying to call the GitLab Repository File API (https://docs.gitlab.com/ee/api/repository_files.html)
It states that the file path is part of the URL path and it should be url encoded.
When i try ...
1
vote
1
answer
447
views
Cant get TestRestTemplate to not follow redirects
I want to test some endpint that return a redirect (302).
I want to use TestRestTemplate to test it but I cant get it to not automatically follow the redirect. I just want to get the response not make ...
0
votes
2
answers
72
views
How to upload a big file by RestTemplate?
I get a MultipartFile from users and resent it to an API by RestTemplate. But I get ArrayIndexOutOfBoundsException if a file size biger than 2gb
java.lang.ArrayIndexOutOfBoundsException: arraycopy: ...
2
votes
0
answers
539
views
Migrating RestTemplate code to RestClient code in Spring Boot app
I want to use the Spring Boot's RestClient feature for my application.
So, I want to migrate the existing Spring Boot's RestTemplate code to Spring Boot's RestClient code.
I have a code that works ...
2
votes
1
answer
1k
views
WebClient micrometer trace propagation is not working
Spring boot version 3.3.2
When using WebClient with each request to another microservice new traceId is created:
api-gateway service -> order-service
same traceID for api gateway and order service
...
1
vote
2
answers
223
views
Rest Template Returns Response in Garbled Characters Some Sort of Chinese
I am using rest template to call API, when I hit the API using rest template it returns some garbled characters like Chinese.
ResponseEntity<String> response = restTemplate.exchange(url, method, ...
1
vote
0
answers
33
views
Translating RestTemplate to WebClient, PUT with empty Body
I have this code in Java 8 using RestTemplate.
@Override
public ResponseCambioEstadoDTO actualizarLead(String idLead) {
Map<String, String> uriVariables = new HashMap<>();
...
-1
votes
1
answer
31
views
spring resttemplate call throwing unauthorized error
i need to call service admin app to app with http. both the services is listening on port
c053b74b7e3a app-pre_prod:latest "java -jar -Dspring...." 0.0.0.0:8080->8080/tcp, :::8080-&...
0
votes
1
answer
93
views
Internal server error in server works in localhost
Below code is throwing 500 Internal server error only in server but works in local host. Any input is appreciated.
Controller endpoint:
@ApiOperation(value = "This API gets info from external ...
1
vote
0
answers
222
views
How to handle HTTP 429 in Spring Boot AI App?
I am trying to develop a application using spring Gen AI.
Endpoint returns a Http 429 error code
Error response: I ran into this error below
retrofit2.adapter.rxjava2.HttpException: HTTP 429
at ...
2
votes
1
answer
3k
views
Server Side events consumer from spring boot
Given that i have this service-A with this endpoint which returns contentType(MediaType.TEXT_EVENT_STREAM)
@Bean
public RouterFunction<ServerResponse> notificationsRoute(CustomHandler ...