Open rndinsider opened 1 week ago
Could you please share a sample to reproduce an issue? At the moment it is quite difficult to help you.
https://github.com/spring-projects/spring-boot/wiki/How-To-Get-Help#defining-the-problem
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Running Spring Boot 3.2.5. Using org.springframework.spring-aspects
While Using org.aspectj.lang.annotation.Around we noticed in consistency when using multi threads for invoking a method expected to be get into the aspect. We are using a
@Around("execution( org.springframework.web.client.RestTemplate.(..))")
ExecutorService executor; executor = Executors.newFixedThreadPool(50); .. future.get(); // Inconsistency shows at some cases, expected http enrichments made by the Aspect are not added. After checking we saw that in some cases, the RestTemplate exchange method is not intercepted by the Aspect. This is while in some cases, for the the same argument (same exchange invocations), there are no issues at all, and all exchange calls are intercepted and headers are enriched with required values.