Created
July 13, 2019 09:11
-
-
Save j-tim/a176f21d24a8ee7620a1d0b5f42e867e to your computer and use it in GitHub Desktop.
Create a RestTemplate instance as a bean.
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.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.web.client.RestTemplate; | |
@Configuration | |
public class RestTemplateConfiguration { | |
@Bean | |
public RestTemplate restTemplate() { | |
return new RestTemplate(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment