at com.huiyun.dao.base.impl.AdvertisingDaoImpl.insertVideoResource(AdvertisingDaoImpl.java:45)
at com.huiyun.service.impl.AdvertisingServiceImpl.addVideoResource(AdvertisingServiceImpl.java:80)
at com.huiyun.controller.AdvertisingController.newAddaddVideo(AdvertisingController.java:136)
public int insertVideoResource(VideoResource vr) {
return getSqlSession().selectOne(Advertising.class.getName()+".insertVideoResource",vr);//就是運行到裡,數據保存進去以後,就出現空指針異常
}
public int addVideoResource(Advertising ad) {
if(ad==null){
return 0;
}
advertisingDao.insert(ad);//
VideoResource vr= new VideoResource();
vr.setAid(ad.getId());
vr.setVideoUrl(ad.getVideoUrl());
return advertisingDao.insertVideoResource(vr);
}
那你調試下程序,看看是哪裡出現的問題