***************************
APPLICATION FAILED TO START
***************************
Description:
Field restTemplate in com.tanhua.sso.service.HuanXinTokenService required a bean of type 'org.springframework.web.client.RestTemplate' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'org.springframework.web.client.RestTemplate' in your configuration.
解决方案:
创建一个Config类:
@Configuration
public class Config {
@Bean
public RestTemplate restTemplate(RestTemplateBuilder builder){
return builder.build();
}
}
更多推荐
解决:Consider defining a bean of type ‘org.springframework.web.client.RestTemplate
发布评论