@ResponseBody returns empty object

When I use below to get the user object it works just fine. @GetMapping(“/findOne”) @ResponseBody public Optional findOne (Long id) { return appUserRepository.findById(id)…