@Configuration public class RestTemplateConfig extends Object
配置RestTemplate,RestTemplate是Spring提供的用于访问Rest服务的客户端,提供了多种便捷访问远程Http服务的方法,能够大大提高客户端的编写效率
Constructor and Description |
---|
RestTemplateConfig() |
Modifier and Type | Method and Description |
---|---|
org.springframework.web.client.RestTemplate |
restTemplate()
构造RestTemplate实例,把RestTemplate实例作为一个JavaBean交给Spring管理
|
Copyright © 2021. All rights reserved.