Let\'s take a look at the following simple test controller (Used with Spring 4.0.3):
@RestController
public class Te
Here are the steps that I did to achieve this :
Add dependency in pom file:
com.fasterxml.jackson.core
jackson-databind
2.9.3
Put @ResponseBody annotation on your method like this:
@RequestMapping(value = "/getCountries", method = RequestMethod.GET)
@ResponseBody
public List getCountries() {
return countryDAO.list();
}