进入会议报temp空指针异常
来源:1-1 课程导学 :SpringBoot 在线协同办公小程序开发

莉莉周想喝奶茶
2021-04-19
错误:java.lang.NullPointerException: Cannot invoke “Object.toString()” because “temp” is null
at com.example.emos.wx.service.impl.MeetingServiceImpl.searchRoomIdByUUID(MeetingServiceImpl.java:200)
at com.example.emos.wx.controller.MeetingController.searchRoomIdByUUID(MeetingController.java:147)
at com.example.emos.wx.controller.MeetingControllerFastClassBySpringCGLIBFastClassBySpringCGLIBFastClassBySpringCGLIBabe39e21.invoke()
报错的代码
public Long searchRoomIdByUUID(String uuid) {
Object temp = redisTemplate.opsForValue().get(uuid);
long roomId = Long.parseLong(temp.toString());
return roomId;
}
写回答
1回答
-
神思者
2021-04-19
你到会议相关的章节提问,你把问题放在导学章节并不合适,新同学看到你的问题不知所以
012023-06-28