List of usage examples for org.springframework.web.client RestTemplate RestTemplate
public RestTemplate()
From source file:de.aikiit.sonaranalysis.Application.java
@Override public void run(String... strings) throws Exception { RestTemplate restTemplate = new RestTemplate(); Quote quote = restTemplate.getForObject("http://gturnquist-quoters.cfapps.io/api/random", Quote.class); log.info(quote.toString());//from w w w . j a va 2s.c o m log.info("Application finished successfully."); }
From source file:demo.client.ChartClient.java
public ChartClient(String hostUri) { resourceUri = hostUri + ResourcePaths.CHART_PATH; restTemplate = new RestTemplate(); restTemplate.setErrorHandler(new DefaultResponseErrorHandler()); }
From source file:gumga.framework.security.GumgaSecurityProxy.java
public GumgaSecurityProxy() { restTemplate = new RestTemplate(); }
From source file:edu.eci.cosw.restcontrollers.RestControladorStubs.java
/** * //from ww w .j av a 2 s.c om * @param nit * @return true en caso de que el establecimiento se encuentre registrado ante la Cmara de comercio y false en caso contrario. */ @RequestMapping(value = "/camaracomercio/{nit}", method = RequestMethod.GET) public boolean verificarlegalidad(@PathVariable String nit) { RestTemplate restTemplate = new RestTemplate(); String nie = (nit.length() > 13) ? nit.substring(0, 13) : nit; Map<String, String> vars = new HashMap<>(); vars.put("nit", nie + nie); return restTemplate.getForObject( "https://damp-mesa-1375.herokuapp.com/rest/stubs/camaracomercio/externo/{nit}", Boolean.class, vars); }
From source file:com.art4ul.jcoon.bean.RestClientAnnotationBeanPostProcessor.java
public RestClientAnnotationBeanPostProcessor() { this.restTemplate = new RestTemplate(); }
From source file:gr.cti.android.experimentation.client.WebServiceAndroidClient.java
public WebServiceAndroidClient() { this.token = ""; restTemplate = new RestTemplate(); }
From source file:org.connid.bundles.openam.restful.RestfulClientMethods.java
public RestfulClientMethods() { restTemplate = new RestTemplate(); }
From source file:client.RestConnector.java
public void connect() { restTemplate = new RestTemplate(); System.out.println("Rest adapter initialized and connected"); }
From source file:io.github.easyframe.demo.eureka.resttemplate.MyConfiguration.java
@Primary
@Bean
RestTemplate restTemplate() {
return new RestTemplate();
}
From source file:univ.lecture.riotapi.Application.java
@Bean public RestTemplate createRestTemplate() { return new RestTemplate(); }