Skip to content
Advertisement

Tag: jackson-databind

MappingJackson2HttpMessageConverter configuration is not being recognized in spring boot 2

I am working with spring for a while already and in my spring boot 1.5x’s projects always dealing with the LazyInitializationException with the next configuration (more downstairs) but now I am creating a new project with spring boot 2 and the same configuration is not being recognized further than WebMvcConfigurer now replace to the deprecated WebMvcConfigurerAdapter. My configuration: But after

Lombok builder pattern with jackson JsonProperty

I have constructed a Java Object using lombok with builder pattern. But, I am getting the following exception when trying to deserialize a Java object using Jackson. This occurs for fields which has @JsonProperty annotation. Exception in thread “main” com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field “user_name” (class User$UserBuilder), not marked as ignorable (2 known properties: “userName”, “userId”]) at [Source: (String)”{“userId”:1,”user_name”:”username”}”; line: 1, column:

UnrecognizedPropertyException: Unrecognized field not marked as ignorable at Source: org.apache.catalina.connector.CoyoteInputStream@14ec141

I am making rest web-services my code is: but when i call it with this Json : I’m getting following Exception: javax.servlet.ServletException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field “userId” (Class com.tazligen.model.GroupMemberMap), not marked as ignorable at [Source: org.apache.catalina.connector.CoyoteInputStream@14ec141; line: 2, column: 15] (through reference chain: com.tazligen.model.GroupMemberMap[“userId”]) My GrouMemberMap model class is : I have tried another method just like this : with json

Advertisement