亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

跨域成功之后,debug已經從session得到值了,但是注冊失敗,信息如下

### Error updating database.? Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

### The error may involve com.miaoshaproject.dao.UserPasswordDOMapper.insertSelective-Inline

### The error occurred while setting parameters

### SQL: insert into user_password

### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1] with root cause


com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1


正在回答

2 回答

UserDOMapper.xml

id="insertSelective"?中添加
keyProperty="id"?useGeneratedKeys="true"
UserServiceImpl中
//實現model轉成do(dataobject)方法
UserDO?userDO=convertFormModel(userModel);
userDOMapper.insertSelective(userDO);
后添加
userModel.setId(userDO.getId());


1 回復 有任何疑惑可以回復我~
#1

慕容3596821

棒??!
2021-07-04 回復 有任何疑惑可以回復我~
#2

qq_慕尼黑3458450

改了之后還是報錯Invalid bound statement (not found): com.secondkill1project.dao.UserInfoDOMapper.insertSelective]
2021-08-10 回復 有任何疑惑可以回復我~

insertByPrimaryKey中加這個沒:

keyProperty="id"?useGeneratedKeys="true"


0 回復 有任何疑惑可以回復我~
#1

dpq592 提問者

謝謝,看到后面發現了,很感謝
2021-03-07 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

跨域成功之后,debug已經從session得到值了,但是注冊失敗,信息如下

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號