How do I create a subclass of spring rest template where interceptors are already set. The purpose of this is to avoid set interceptors everytime resttemplate is instantiated. I just want to use the instance of this custom class directly.
Asked
Active
Viewed 199 times
1
-
Can't you just extend `RestTemplate`? – Hank May 20 '15 at 23:07
-
Instead of instantiating, configure it in your context and retrieve it from there. That instead of creating a new instance each time you need one. – M. Deinum May 21 '15 at 06:25