[Solved] RestClientService required a bean of type ‘org.springframework.web.client.RestTemplate’

Full Exception:

RestClientService required a bean of type ‘org.springframework.web.client.RestTemplate’ that could not be found.

Solution:

Add this below snippet to your main class / starter of your spring boot application, (Basically where you have this annotation “@SpringBootApplication”, in the same class add this as additional method).

@Bean
public RestTemplate restTemplate() {
	return new RestTemplate();
}

Leave a Reply