eclipse, Java, REST, Spring, Spring Boot

Bypass SSL certification with Spring RestTemplate

Recently I wanted to try out a REST call on my local computer, running my microservice locally. The service calls another microservice, in the SIT environment, that required secure HTTP s connection. As I did not have the certificate installed on my workstation, but wanted to fast test the call anyway, I had to find… Continue reading Bypass SSL certification with Spring RestTemplate

Advertisement
REST, Spring, Spring Boot

Using multiple RetsTemplates in Spring Boot application

Recently I had to request information from my Spring Boot application from multiple services via REST. Normally it works so simple as calling a the service URL, like this: ResponseEntity response = restTemplate.getForEntity(url, MyResponse.class);   Although in my case both services required different authentication method. The first one was an open service, the second one… Continue reading Using multiple RetsTemplates in Spring Boot application

REST, Spring

Implementing inheritance for JSON objects

Our App developers wanted to send slightly different JSON elements in a single list, in order to make the App side implementation far less complicated. In order to make it possible to, I decided to implement inheritance hierarchy for the JSON input and the related java DTO classes. The other possibility would be to have… Continue reading Implementing inheritance for JSON objects

REST, Spring Boot

Custom validator for REST parameter in Spring Boot

Using Spring boot applications, it is very easy to let the Spring framework to do the validation of the REST input parameter. You only need to add the corresponding validation annotations to the properties of the parameter class, and mark the parameter with @Valid annotation in the method header. @RequestMapping(value = "/register", method = {… Continue reading Custom validator for REST parameter in Spring Boot

Atlassian, Java, REST

Using Application Link in Atlassian plugins

When implementing complex plug-ins for the Atlassian suite, it might be needed to request information from another Atlassian application. You can see examples for it, when JIRA shows Stash commits, of Confluence pages. As all Atlassian applications has a REST API, it is possible to make JSON calls directly. Using Application Links for communication between… Continue reading Using Application Link in Atlassian plugins