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
Month: October 2017
Tipp and tricks using Spring Data
Spring Data is a very comfortable way of defining DAO objects for your project. It can generate a DAO for your entity class, and provide all basic CRUD functions out of the box. You only need to define an interface, inherited from CrudRepository. For more information of Spring Data basics I recommend reading following resources http://projects.spring.io/spring-data… Continue reading Tipp and tricks using Spring Data
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