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.
More Related Contents:
- JQuery, Spring MVC @RequestBody and JSON – making it work together
- Spring MVC – How to return simple String as JSON in Rest Controller
- How does the Spring @ResponseBody annotation work?
- Spring 4 – addResourceHandlers not resolving the static resources
- JSON parameter in spring MVC controller
- Serializing enums with Jackson
- Jackson 2.0 with Spring 3.1
- In Spring MVC, how can I set the mime type header when using @ResponseBody
- Parsing JSON in Spring MVC using Jackson JSON
- How do I obtain the Jackson ObjectMapper in use by Spring 4.1?
- Spring RequestMapping for controllers that produce and consume JSON
- Spring 3.0 making JSON response using jackson message converter
- HTTP Status 406. Spring MVC 4.0, jQuery, JSON
- Why does Jackson 2 not recognize the first capital letter if the leading camel case word is only a single letter long?
- Spring MVC 4: “application/json” Content Type is not being set correctly
- Spring @RequestBody containing a list of different types (but same interface)
- Spring-MVC 406 Not Acceptable instead of JSON Response
- Spring MVC PATCH method: partial updates
- Spring MVC: How to modify json response sent from controller
- Why DispatcherServlet creates another application context?
- How to use multiple @RequestMapping annotations in spring?
- Return only string message from Spring MVC 3 Controller
- How can I read request body multiple times in Spring ‘HandlerMethodArgumentResolver’?
- Can you completely disable CORS support in Spring?
- Spring MVC: difference between and tags? [duplicate]
- java.lang.IllegalStateException: No thread-bound request found, exception in aspect
- Failed to load ApplicationContext caused by ArrayIndexOutOfBoundsException in ClassReader
- How to handle DataIntegrityViolationException in Spring?
- log4j:WARN No appenders could be found for logger in web.xml
- How to unit test a Spring MVC controller using @PathVariable?