I am trying to get the list of data as list. But i need to return http status 404 if server is unreachable. for me POST method is working fine , but GET method returns 200 with http.ok to client page. how to add response ?
@RequestMapping(value = "/config/filedata/data", method = RequestMethod.GET)
@ResponseBody
public List<filedata> getAllFileDatas()
{
return filedataServices.getAllFileDatas();
}