org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: 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 'name = '凌云'
### The error occurred while setting parameters
### SQL: select id,name,email,age from student where id>0 name = ? and age > ?
### Cause: java.sql.SQLSyntaxErrorException: 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 'name = '皓轩'
and age > 23' at line 4
select id,name,email,age from student
where id>0
<if test="name !=null and name != '' ">
and name = #{name}
</if>
<if test="age > 0">
and age > #{age}
</if>
如上:少写了一个and.