I\'m trying to use stream in java, i had a student class:
@Entity @Data @AllArgsConstructor @NoArgsConstructor public class Student { @Id @GeneratedValue(str
To be able to use it in map() function, StudentRepository.findById() needs to return Optional instead of just Student.
map()
StudentRepository.findById()
Optional
Student