i am currently making a website using spring and i stumble upon this basic scenario that i don\'t have any idea on how to solve this specific code: Entity = Optional;
Try this, it works for me
RoomEntity roomEntity = roomRepository.findById(roomId).orElse(null);