rosettapebble

Untitled

Jun 30th, 2021
27
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package app2;
  2.  
  3. import org.springframework.boot.SpringApplication;
  4. import org.springframework.boot.autoconfigure.SpringBootApplication;
  5. import org.springframework.cloud.client.loadbalancer.LoadBalanced;
  6. import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
  7. import org.springframework.cloud.netflix.ribbon.RibbonClient;
  8. import org.springframework.context.annotation.Bean;
  9. import org.springframework.web.client.RestTemplate;
  10.  
  11. @RibbonClient("App1")
  12. @EnableEurekaClient
  13. @SpringBootApplication
  14. public class App2 {
  15. public static void main(String[] args) {
  16. SpringApplication.run(App2.class, args);
  17. }
  18.  
  19. @Bean
  20. public RestTemplate restTemplate() {
  21. return new RestTemplate();
  22. }
  23. }
  24.  
RAW Paste Data