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;
RoomEntity roomEntity = roomRepository.findById(id).get();
This will solve your error!