publicPostDTOfindById(String id) {Post post =postRepository.findById(id).orElseThrow(() ->newResourceNotFound("Post not found"));returnnewPostDTO(post);}privatePostgetEntityById(String id) {Optional<Post> post =postRepository.findById(id);returnpost.orElseThrow(() ->newResourceNotFound("Objeto não encontrado."));}