import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
* @return rest template instance
*/
@Bean
- @Scope("singleton")
+ @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
public static RestTemplate restTemplate(final RestTemplateBuilder restTemplateBuilder) {
final RestTemplate restTemplate = restTemplateBuilder.build();
setRestTemplateMessageConverters(restTemplate);