Created
July 13, 2019 09:16
-
-
Save j-tim/dd67508a8fabc62da2f8eaa35b49aee1 to your computer and use it in GitHub Desktop.
RestTemplate instance using the RestTemplateBuilder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.stockgeeks.hello.world.api; | |
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 RestTemplateConfiguration { | |
@Bean | |
public RestTemplate restTemplate(RestTemplateBuilder restTemplateBuilder) { | |
return restTemplateBuilder.build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment