詭異! log4j查看日志顯示delete語(yǔ)句執(zhí)行成功,去查看數(shù)據(jù)庫(kù),數(shù)據(jù)沒(méi)被刪除,這是啥原因呢
DEBUG [http-nio-8080-exec-18] - ooo Using Connection [com.mysql.jdbc.Connection@c5dce63]
DEBUG [http-nio-8080-exec-18] - ==> ?Preparing: select id,command,description,content from message?
DEBUG [http-nio-8080-exec-18] - ==> Parameters:?
DEBUG [http-nio-8080-exec-18] - <== ? ? ?Total: 4
DEBUG [http-nio-8080-exec-26] - ooo Using Connection [com.mysql.jdbc.Connection@7fb8fb34]
DEBUG [http-nio-8080-exec-26] - ==> ?Preparing: delete from message where id=??
DEBUG [http-nio-8080-exec-26] - ==> Parameters: 1(Integer)
DEBUG [http-nio-8080-exec-26] - <== ? ?Updates: 1
但是查看數(shù)據(jù)庫(kù)并沒(méi)有刪除,不知道是什么原因。。 ?
2018-07-31
沒(méi)提交唄。不過(guò),為啥select能執(zhí)行,刪除和增加不能執(zhí)行,我也感到奇怪。
2018-07-31
因?yàn)閙ybatis對(duì)jdbc進(jìn)行了封裝,所以要提交事務(wù),所以你是因?yàn)闆](méi)有提交事務(wù)
2018-07-27
看到中間我就自己去做了。。。沒(méi)往下看 這就尷尬了0 0