content: package com.xuan.chapter6.hystrix;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
  import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
  import org.springframework.cloud.client.loadbalancer.LoadBalanced;
  import org.springframework.cloud.netflix.hystrix.EnableHystrix;
  import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
  import org.springframework.cloud.openfeign.EnableFeignClients;
  import org.springframework.context.annotation.Bean;
  import org.springframework.web.client.AsyncRestTemplate;
  import org.springframework.web.client.RestTemplate;
  
  @SpringBootApplication
  @EnableCircuitBreaker
  @EnableFeignClients
  @EnableHystrixDashboard
  public class Chapter6HystrixApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(Chapter6HystrixApplication.class, args);
      }
  
  
      @Bean
      @LoadBalanced
      RestTemplate restTemplate() {
          return new RestTemplate();
      }
  
  
  }
  