0

I have a method which builds the URL for requests coming in

Url = baseURL + requestXMLString
UriComponentsBuilder urib = UricompoonentsBuilder.fromHttpUrl(Url)

.........
.....

//restemplate call in a different class with builder as param (Cannot change this method)
URI uri = urib.builder.build.toUri()
log.info(uri)`
responseEntity = restTemplate.exchange(uri,httpMethod....)

In the above code if multiple request hit and when i print the uri i see sometimes i see

baseURL + requestXMLString

baseURL only (requestXMLString is removed)

And the exchange calls are failing since the URL is not valid.

Any suggestions ? TIA

Trying to make it multi threaded in this SpringBoot app. The restemplate calls should work always

0 Answers0