title: Spring Rest Template
body: <p>What is the benefit of returning new rest template in the main class?  </p>
  
  <p>From my understanding by registering a Bean restTemplate in the main class, we basically register it in advance and then every time we use the field Rest Template in other classes, Spring automatically just takes it from the container.  </p>
  
  <pre><code>
      @Bean
      RestTemplate restTemplate() {
          return new RestTemplate();
      } 
  </code></pre>