项目基础环境是spring boot的
spring boot相关知识不做详解
webservice 基本结构如下
webservice 相关调试,获取请求参数可参考
pom中不需要额外引用
- 配置RestTemplateConfig
package com.xxxx.base.common.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
@Configuration
public class RestTemplateConfig {
@Bean
public RestTemplate restTemplate(ClientHttpRequestFactory factory) {
return new RestTemplate(factory);
}
@Bean
publ