>spring1.4 添加RestTemplate的注入
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
package com.gzzn.omms.adminapi.config;
|
||||||
|
|
||||||
|
import org.springframework.boot.web.client.RestTemplateBuilder;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class MySpringBootConfig {
|
||||||
|
@Bean
|
||||||
|
public RestTemplate restTemplate(RestTemplateBuilder builder) {
|
||||||
|
// Do any additional configuration here
|
||||||
|
return builder.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user