Hackerss.com

hackerss
hackerss

Posted on

Rest template with springboot in Java

Rest template with springboot - Java:


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}

Enter fullscreen mode Exit fullscreen mode

Oldest comments (0)