最新回答 / 慕慕1568843
視頻作者,少寫了步驟,這塊需要你自己添加上。執(zhí)行userDOmapper.insertSelective(userDO)之后,userDO這個對象的id就有了你需要使用userDO的id,然后再設(shè)置給userpasswordDO.userModel里面是沒有user id的值的。
2019-11-19
最贊回答 / qq_慕函數(shù)4423931
mybatis.mapper-locations=classpath:mapping/UserDOMapper.xml在application.properties中把站長那個配置改成這個,就行了。之前把mapping/*.xml這個語句注釋掉,報500There was an unexpected error (type=Internal Server Error,...
2019-11-19
最贊回答 / qq_時代劫匪_0
userDOMapper.insertSelective(userDO); 插入完了,再進行set試試 userModel.setId(userDO.getId());
2019-10-31