Questions
MiuraMiuraasked 4 months ago
when i autowired restTemplate inside the service class, show this error,
Could not autowire. No beans of 'RestTemplate' type found.
1

1 Answers

Accepted
codegenlabcodegenlabanswered 4 months ago
add below code inside service class,
@Bean
public RestTemplate restTemplate() {
    return new RestTemplate();
}
1