Spring version 4.2.0, Hibernate 4.1.4
Here is my Controller
function:
@RequestMapping(value = \"/mobile/getcomp\", method = Req
In my case I was using jackson-databind-2.8.8.jar
that is not compatible with JDK 1.6
I need to use so Spring wasn't loading this converter. I downgraded the version and it works now.
Yes just add the setters/getters with public modifier ;)
When I was facing this issue, I simply put just getter setter methods and my issues were resolved.
I am using Spring boot version 2.0.
I was using groovy+springboot and got this error.
Adding getter/setter is enough if we are using below dependency.
implementation 'org.springframework.boot:spring-boot-starter-web'
As Jackson core classes come with it.
Add the below dependency to your pom.xml:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.5.0</version>
</dependency>
I was facing same issue. I did not put @ResponseBody
since I was using @RestController
. But still I was getting error because I did not put the getter/setter
method for the Company class. So after putting the getter/setter
my problem was resolved.