I created a spring boot application using spring -cloud and want to use RestTemplate in my client application (which is also a microservice) so that I can continue to use mockMvc to test integration. I use the default ribbon / eureka / hystrix client setting with my microservice client and eureka client in the service I'm calling. This works (as soon as I realized that serviceIds is what identifies the service endpoint in restTemplate). My problem is that I seem to be unable to change the readTemplate read or timeout due to what seems to be a default of 300 ms.
Call Details:
`@Configuration @EnableAutoConfiguration @ComponentScan @EnableConfigurationProperties @EnableHystrix @EnableEurekaClient public class Application { ... public static void main(String[] args) {} ... } @Component class EricComponentToDoHystrix {
with application.properties application containing:
spring: cloud: client: serviceIds: - someservice someservice: ribbon:
Does anyone know what properties I need to configure to change restTemplate default timeouts? The documentation is very light on this point, and it seems like the code most recently even allowed restTemplate to be used with / eureka spring feed loading settings. It may not have been built yet.
spring cloud
RubesMN
source share