Add serviceCatalog rest services
[externalapi/nbi.git] / src / main / java / org / onap / nbi / apis / RestConfiguration.java
1 package org.onap.nbi.apis;
2
3 import org.onap.nbi.exceptions.BackendErrorHandler;
4 import org.springframework.boot.web.client.RestTemplateBuilder;
5 import org.springframework.context.annotation.Bean;
6 import org.springframework.context.annotation.Configuration;
7 import org.springframework.web.client.RestTemplate;
8
9 @Configuration
10 public class RestConfiguration {
11
12     @Bean
13     public RestTemplate restTemplate(RestTemplateBuilder builder) {
14         RestTemplate restTemplate = builder.build();
15         restTemplate.setErrorHandler(new BackendErrorHandler());
16         return restTemplate;
17     }
18 }