**刚开始学习 mybatis 使用SQL动态 if **
**问题描述:**Error querying database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax;
**报错:**Cause: java.sql.SQLSyntaxErrorException: 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 'username=‘Xxx’
太大意了, SQL字符创拼接 and没有填写,一直报SQL语法错误!