REST API call from oxygen plugin using org.springframework.web.client.RestTemplate
Posted: Wed Feb 10, 2021 2:52 pm
Hello Team ,
We have a oxygen Plugin , where We have a REST API to be called , used the client org.springframework.web.client.RestTemplate
String RestEndpoint ="http://servername:8080/RestAPI/names";
RestTemplate restTemplate = new RestTemplate();
List<Name> allNames=Arrays.stream(restTemplate.getForObject(RestEndpoint, Name[].class)).collect(Collectors.toList());
and we have POM.xml dependency
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.0.1.RELEASE</version>
</dependency>
the standalone call from Eclipse works fine , where when we have our plugin jar under oxygen plugin , nothing is happening , the rest call not even throwing any exception.
would be great if any inputs here.
Thanks,
vishwa
We have a oxygen Plugin , where We have a REST API to be called , used the client org.springframework.web.client.RestTemplate
String RestEndpoint ="http://servername:8080/RestAPI/names";
RestTemplate restTemplate = new RestTemplate();
List<Name> allNames=Arrays.stream(restTemplate.getForObject(RestEndpoint, Name[].class)).collect(Collectors.toList());
and we have POM.xml dependency
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.0.1.RELEASE</version>
</dependency>
the standalone call from Eclipse works fine , where when we have our plugin jar under oxygen plugin , nothing is happening , the rest call not even throwing any exception.
would be great if any inputs here.
Thanks,
vishwa