I've implemented a java method which call to external services via a Resttemplate. As well, i've implemented some additional business logic also inside that method. How can i implement a retry mechanism for these rest calls. Need to consider below points as well.

1. I cannot add a retry for entire method.
2. It's better to add retry for rest calls(via resttemplate).
3. There should be a way disable retry options for unwanted rest calls.