Jackson is returning duplicate rows

I am trying to return json from these two entity classes. Questions.java @Entity public class Questions { @Id @Column(name = "id") private int id; @Column(name = "question") private String question; @Column(name = "type") private String type; ...
more »

2017-03-19 19:03 (2) Answers

Validate nested object in Jackson

Ive got a spring project and using jackson for json serialization and deserialization. And I have these DTOs defined, CertManDTO, public class CertManDTO implements Serializable { private static final long serialVersionUID = 1L; private ...
more »

2017-03-10 03:03 (2) Answers

spring-data-redis Jackson serialization

I'm attempting to use the Jackson serialization feature of spring-data-redis. I am building a ObjectMapper and using the GenericJackson2JsonRedisSerializer as the serializer for the redisTemplate: @Configuration public class SampleModule ...
more »

2017-03-01 22:03 (1) Answers

Reading JSON map structure via spring boot

If I have the following JSON structure returned by my REST service: { "foo" : { "id" : "baz" } "qux" : { "id" : "toto" } } To me it looks like a map structure. I am not sure how I can read this using spring boot (via Jackso...
more »

2017-02-28 21:02 (1) Answers

Getting HTTP Status 404 - /hello/?

I am new to this maven - spring project i done the coding and configurations for the project but when ever i try to run this project i am getting the 404 resource not found error i tried this example.i follow the given directory structure in this e...
more »

2017-02-23 11:02 (2) Answers

Referenced file contains errors

I'm having a problem when I try to validate the application context for my java web application with spring and zk spring. my applicationcontext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schem...
more »

2017-02-23 09:02 (0) Answers

Spring Jackson Serialization infinite recursion

I have a Spring REST service whose API controller returns an object A. I am getting the following exception: Could not write content: Infinite recursion (StackOverflowError) (through reference chain: com.company.product.platform.service.contract.A[\...
more »

2017-02-21 07:02 (0) Answers

Spring Cache refreshing obsolete values

In a Spring-based application I have a service which performs the calculation of some Index. Index is relatively expensive to calculate (say, 1s) but relatively cheap to check for actuality (say, 20ms). Actual code does not matter, it goes along the ...
more »

2017-02-20 12:02 (2) Answers