mirror of
https://gitee.com/wangkang/udf.git
synced 2026-10-26 10:23:42 +00:00
去掉多余bean的定义
This commit is contained in:
@@ -11,7 +11,6 @@ import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import org.itkk.udf.core.xss.XssStringJsonSerializer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
@@ -62,18 +61,6 @@ public class BaseApplication {
|
||||
return objectMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : restTemplate
|
||||
*
|
||||
* @param requestFactory requestFactory
|
||||
* @return RestTemplate
|
||||
*/
|
||||
@Bean
|
||||
@LoadBalanced
|
||||
public RestTemplate restTemplate(ClientHttpRequestFactory requestFactory) {
|
||||
return new RestTemplate(requestFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : externalRestTemplate
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.http.client.ClientHttpRequestFactory;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
@@ -43,6 +44,7 @@ public class RmsConfig {
|
||||
*/
|
||||
@Bean
|
||||
@LoadBalanced
|
||||
@Primary
|
||||
RestTemplate restTemplate(ClientHttpRequestFactory requestFactory) {
|
||||
return new RestTemplate(requestFactory);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user