查看控制台,如果是
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 'and name like concat('%','张','%')...
则进入EmployeeMapper.xml修改sql语句为:
<select id="pageQuery" resultType="com.sky.entity.Employee">
select * from employee
<where>
<if test="name != null and name != '' ">
-- like 模糊查询
name like concat('%',#{name},'%')
</if>
</where>
order by create_time desc
</select>
重新运行启动即可