admin管理员组文章数量:1794759
Consider defining a bean of type ‘org.springframework.web.client.RestTemplat
记录下几天敲代码遇到的小问题
Description: Field restTemplate in com.lifly.controller.FreemarkerController required a bean of type 'org.springframework.web.client.RestTemplate' that could not be found. Action: Consider defining a bean of type 'org.springframework.web.client.RestTemplate' in your configuration.以上错误是说找不到RestTemplate对象,需要在配置文件中配置一下,
@Configuration public class RestTemplateConfig { @Bean public RestTemplate restTemplate(RestTemplateBuilder builder){ return builder.build(); } }这样就好了
本文标签: typeorgdefiningbeanClient
版权声明:本文标题:Consider defining a bean of type ‘org.springframework.web.client.RestTemplat 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686554660a81287.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论