Return type of JPA Repository 'getOne(id)' Method
问题 I have the following Spring boot service for an object of type Report - @Service public class ReportService { @Autowired private ReportRepository reportRepository; @Autowired private UserRepository userRepository; /*get all reports */ public List<Report> getAllReports(){ return reportRepository.findAll(); } /*get a single report */ public Report getReport(Long id){ return reportRepository.getOne(id); } //other similar methods.... } The problem arises while retrieving a single Report. If a