詭異! log4j查看日志顯示delete語句執行成功,去查看數據庫,數據沒被刪除,這是啥原因呢
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
但是查看數據庫并沒有刪除,不知道是什么原因。。 ?
2018-07-31
沒提交唄。不過,為啥select能執行,刪除和增加不能執行,我也感到奇怪。
2018-07-31
因為mybatis對jdbc進行了封裝,所以要提交事務,所以你是因為沒有提交事務
2018-07-27
看到中間我就自己去做了。。。沒往下看 這就尷尬了0 0