om.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; chec

使用mybatis報錯,緣由很清楚就是sql存在語法錯誤,這種錯誤有多是使用了關鍵字的字段引發的,自行檢查了並無發現mysql的關鍵字,檢查了sql好像也沒發現什麼問題,沒辦法只能mybatis源碼,發現這樣的sql的參數並無被替換成佔位符mysql

select id, nickname, email, pswd, create_time, last_login_time,statussql

from  u_user where  username={#username,jdbcType=VARCHAR}mybatis

跟代碼發現緣由以下:server

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near  at line 4 - m15627293516 - 許康鑾我的博客

終於發現本身犯了一個很低級的錯誤,在這裏記錄一下這個低級錯誤。源碼

相關文章
相關標籤/搜索