Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
67 views

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 ...
bobs it geeks's user avatar
0 votes
0 answers
149 views

Our controller looks like this: public ResponseEntity<ServiceResponse<List<String>>> getItemIdentifiers( @RequestParam(required = true) String category_, @...
PAMPA ROY's user avatar
2 votes
2 answers
4k views

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 ...
Vy Do's user avatar
  • 1
1 vote
0 answers
557 views

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 ...
Aishu's user avatar
  • 1,340
0 votes
0 answers
47 views

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 ...
marcell-janovszki's user avatar
1 vote
1 answer
436 views

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 ...
Holden Karl Hain's user avatar
0 votes
2 answers
70 views

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: ...
Konstantin Panisov's user avatar
2 votes
0 answers
524 views

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 ...
Jorge Rabello's user avatar
2 votes
1 answer
1k views

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 ...
KnOMM's user avatar
  • 33
1 vote
2 answers
214 views

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, ...
MM Ary's user avatar
  • 11
1 vote
0 answers
33 views

I have this code in Java 8 using RestTemplate. @Override public ResponseCambioEstadoDTO actualizarLead(String idLead) { Map<String, String> uriVariables = new HashMap<>(); ...
joseluisbz's user avatar
  • 1,696
-1 votes
1 answer
31 views

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-&...
pappu_kutty's user avatar
  • 2,518
0 votes
1 answer
91 views

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 ...
user4130072's user avatar
1 vote
0 answers
220 views

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 ...
Krishna Chavan's user avatar
2 votes
1 answer
3k views

Given that i have this service-A with this endpoint which returns contentType(MediaType.TEXT_EVENT_STREAM) @Bean public RouterFunction<ServerResponse> notificationsRoute(CustomHandler ...
daniel's user avatar
  • 35
0 votes
1 answer
549 views

I have a requirement where I need to fetch the response of various company results. Each company will share a REST API with me (with all the details to invoke the API). I need to read a particular ...
Saurabh Tiwari's user avatar
1 vote
2 answers
790 views

As discussed in Springboot 3.2.0 custom RestTemplate doesn't send Content-Length there was a problem regarding content-length with spring-boot 3.2.0. As recommended in https://github.com/spring-...
Erich Achilles's user avatar
0 votes
2 answers
299 views

I work with Spring Boot and REST template. I want to get the information of user connect but I get the information just if I connect with admin account and not the author account. This is my code ...
Guost's user avatar
  • 1
1 vote
1 answer
77 views

I created an endpoint to return an access token to my application. When I convert the json from the token to an object called user, postman keeps processing it and reports a timeout. No errors are ...
Adriano Gomes's user avatar
1 vote
0 answers
2k views

After Spring Boot 3.x version, an error is received when passing a null header to Resttemplate. Is there any way to overcome this situation? Error: java.lang.NullPointerException: Parameter specified ...
kernel's user avatar
  • 912
0 votes
0 answers
66 views

Is it possible to disable encoding process when request XML with RestTemplate? I need to send my value like this ud=HELLOOOO YEYEYE🥺🥺©À¥¥didi🥺wawa©yayuÀ ud=HELLOOOO YEYEYE&#x1f97a;&#x1f97a;&...
annng's user avatar
  • 77
1 vote
0 answers
364 views

I switched from RestTemplate to RestClient in my application and since switching I’m unable to get the same TraceId between services. Is anyone else having this same problem? I tried updating ...
Ashley James's user avatar
3 votes
0 answers
237 views

My project is using sping boot 2.3.3.RELEASE. <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <...
Nick Dong's user avatar
  • 3,796
-1 votes
1 answer
179 views

@Service public class AirService { @Value("${api.key}") private String apiKey; @Value("${api.url}") private String apiUrl; @Autowired private ...
beyz's user avatar
  • 19
6 votes
2 answers
2k views

I migrated to spring boot 3 and java 21. Since I have a patch rest call to make, i needed the dependency org.apache.httpcomponents.client5:httpclient5:5.2.2. But with that dependency, I get a "...
LisaH's user avatar
  • 101
0 votes
0 answers
107 views

I am not able to use mocked restTemplate twice when calling an api with two different request bodies to have two corresponding responses, it’s giving suggestion like check the arguments for mocked ...
aksh_18's user avatar
  • 21
1 vote
2 answers
834 views

The below mentioned is my requestUrl "http://localhost:80/v1/accounts/60a362bd6b84a37effc8f5a3/name/QA Analyst" I am using the following code UriComponentsBuilder builder = ...
Marcus's user avatar
  • 19
-1 votes
1 answer
172 views

I am not able to mock below piece of restTemplate getForObject , Its giving assertion errors when i run my test case , can some one help me how to mock?. ServiceClient.class String localizationDetails ...
Krish's user avatar
  • 4,250
1 vote
1 answer
1k views

I need to create a pool of connectors using apache.httpcomponents.client5:httpclient5:5.2.1* and SpringBoot(ver 3.1.5) RestTemplate. This code works correctly: private static RestTemplate ...
wuttke's user avatar
  • 155
1 vote
1 answer
716 views

I'm using /* Apache HttpComponents */ val apacheHttpComponentsVersion = "5.2.1" val apacheHttpComponentsGroup = "org.apache.httpcomponents.client5" implementation(&...
Marko Gila's user avatar
1 vote
0 answers
681 views

I am migrating from Spring Boot 2 -> Spring Boot 3 I had such method for getting the restTemplateBuilder to disable cookie management. public static RestTemplateBuilder getRestTemplateBuilder() { ...
springbooter99's user avatar
1 vote
0 answers
318 views

In my application we are reading more than 1 million rows from DB. Storing this data in Csv file in streaming manner by using Jdbc ResultSet. OpenCsv library is used to create CSV file which is zipped ...
SauriBabu's user avatar
  • 434
0 votes
0 answers
52 views

I have a slightly strange use case where my application can run on two different types of networks one of which is extremely restricted and I have encountered issues where the application works on the ...
Patrick Young's user avatar
1 vote
2 answers
3k views

I have two spring boot services A and B. Service A uses a RestTemplate to call an endpoint in Service B. RestTemplate and the call in Service A looks like below: @Bean public RestTemplate ...
Prudvinath's user avatar
-1 votes
1 answer
213 views

when I am trying to call external api using spring boot from public network it is giving response, but when I am calling in from private network then it is giving timeout exception ResponseEntity<...
SkClass's user avatar
  • 21
1 vote
0 answers
65 views

I want to enter a manual id so I can test, but even if I enter 7 it creates the id I want my entity to be auto incrementing, but if I enter the value manually I get the manual value, but even if I ...
Gustavo Henrique's user avatar
1 vote
3 answers
2k views

When using rest template we can handle response statuses other than 200 based on the exception thrown by resttemplate. This article describes this in detail. By default, the RestTemplate will throw ...
CodeBot's user avatar
  • 185
1 vote
1 answer
984 views

following is my method which I am trying to unit test public class Emp { public String getName() { ResponseEntity<LinkedHashMap> res = restTemplate.postForEntity(url, null, LinkedHashMap....
sachin p's user avatar
1 vote
0 answers
556 views

When I use auto-configured bean of RestTemplateBuilder, the timeout field doesn't set as intended. code: public WebHookService(RestTemplateBuilder restTemplateBuilder) { restTemplate = ...
Jiwon's user avatar
  • 1,238
0 votes
1 answer
329 views

I'm building a client for an API where endpoint accepts XML for request (application/xml) and provides XML/JSON back in response (applicaiton/json, application/xml) At the moment of calling the API I ...
Milkywayfarer's user avatar
0 votes
1 answer
1k views

I keep struggling with parsing response represented by a JSON array into a data class entity using Spring with Kotlin and RestTemplate. Non-array like responses are without an issue, ie. the following ...
David Zaba's user avatar
0 votes
1 answer
267 views

I am trying to execute a HTTP GET request that I can execute properly in Postman in my Spring Boot application using the RestTemplate class. This is the code I am using to send the request: ...
P D's user avatar
  • 45
-1 votes
2 answers
613 views

My spring boot is of Microservice architecture. Getting 500 Internal Server error logged in calling microservice. Service A calls Service B with POST request. And Service B processed the request ...
Balaji's user avatar
  • 1
0 votes
1 answer
6k views

i'm working on an tokenValidationInterceptor , where a request for token validation is send to an other micro-service which communicate with keycloak and send an ok status or unautorazed status , then ...
Nouhaila Khaouti's user avatar
3 votes
1 answer
3k views

Is there a way to implement preemptive basic authentication with Apache HttpClient 5.2 using a HttpRequestInterceptor similar to how it's done here (accepted response) for Apache HttpClient 4? We use ...
dascolagi's user avatar
  • 157
1 vote
2 answers
2k views

I try to configure restTemplate to call https url in spring boot 3 but that does not compile. For this i use import org.apache.http.impl.client.HttpClients import org.apache.http.ssl.SSLContexts and ...
abdel's user avatar
  • 47
1 vote
2 answers
1k views

I'm developing an API using Spring Boot 3.1.0 to crawl data, I called this localhost:8080/crawl. Inside this, I also use RestTemplate to call an external API called third-party.com/data. I want to ...
ginbarca's user avatar
0 votes
0 answers
4k views

I'm using Spring Boot RestTemplate to call REST API. On PROD, I'm getting below exception: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://<host&...
Shivshankar Nagarsoge's user avatar
0 votes
1 answer
1k views

I have been experiencing a weird issue trying to call a GraphQL query using RestTemplate from the SpringBoot framework. I say it is weird because it is only happening with this particular query. This ...
Marcelo Tataje's user avatar
2 votes
1 answer
2k views

I have a spring boot appication(version is 3.0.4): <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> &...
gstackoverflow's user avatar

1
2 3 4 5