Remove @Bean RestTemplate

(If users need one they can add it themselves)

Fixes gh-239
This commit is contained in:
Dave Syer
2016-03-31 13:31:34 +01:00
parent 84f4d3720c
commit 00b67a87d5
10 changed files with 122 additions and 67 deletions

View File

@@ -19,11 +19,13 @@ package sample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.integration.annotation.IntegrationComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
/**
* @author Spencer Gibb
@@ -59,6 +61,11 @@ public class SampleMessagingApplication {
return this.transformer.send(msg);
}
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
public static void main(String[] args) {
SpringApplication.run(SampleMessagingApplication.class, args);
}