Caused by: 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 'while id=1' at line 3好久不打sql命令,刚刚学mybatis,就发现了这个错误,最后发现sql语句的条件update tb_user set name=#{name},sex=#{sex},age=#{age} while id=#{id}错了,是where,基础要好好巩固啊。