springBoot报错( MyBatis:check the manual that corresponds to your MySQL server version)

业无高卑志当坚,男儿有求安得闲?这篇文章主要讲述springBoot报错: MyBatis:check the manual that corresponds to your MySQL server version相关的知识,希望能为你提供帮助。
@[TOC]
业务说明昨天用java的SpringBoot写项目,底下是个查询语句(为了说明方便,使用*):

select * from t_student where birthday& gt; = #beforeDate and birthday& lt; = #nowDate order by id /*beforeDate是当前日期的前七天*/

报错:
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 = 2018-11-14 09:42:22.383 and sign_time< = 2018-11-07 09:42:22.383at line 15

报错信息是:在SQL语法中有一个错误;请检查对应于MySQL服务器版本的正确语法使用的手册。
解决错误检查了一下,表名、字段名等都没有问题,框架也正常。
我一开始以为是jdbcType的问题,就加上了jdbcType
select * from t_student where birthday& gt; = #beforeDate,jdbcType=TIMESTAMP and birthday& lt; = #nowDate,jdbcType=TIMESTAMP order by id /*beforeDate是当前日期的前七天*/

【springBoot报错( MyBatis:check the manual that corresponds to your MySQL server version)】仍然报错。。。。。
< br/>
< br/>
< br/>
揪了N多头发以后,终于发现,是> 和=之间有个空格。。。。把空格删了就好了。
select * from t_student where birthday& gt; = #beforeDate,jdbcType=TIMESTAMP and birthday& lt; = #nowDate,jdbcType=TIMESTAMP order by id /*beforeDate是当前日期的前七天*/


    推荐阅读