错误日志:

org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: 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 'LIMIT 5' at line 1 ### The error may exist in com/czh/dao/system/log/LogDao.xml ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: select * from st_sys_log; LIMIT ? ### Cause: 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 'LIMIT 5' at line 1 ;

MyBatis插件PageHelper使用分页异常

sql 语句错误 主要看 'near’附近的错误 ,一般都是语句有问题,多点 多分号啥的

但是 使用分页插件请不要 再输出所有的Sql语句后添加分号,因为会动态在后面拼接Limit 进行分页
MyBatis插件PageHelper使用分页异常
在不使用插件的sql语句是可以添加分号的
Log4j;
MyBatis插件PageHelper使用分页异常

log4j使用教程,将log4j的配置文件直接放在Dao层下resources的文件下即可!
在spring 和 springMybaties 整合的环境下!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2021-12-29
  • 2021-12-26
  • 2022-12-23
猜你喜欢
  • 2021-07-22
  • 2021-11-07
  • 2021-08-10
  • 2021-10-19
  • 2022-02-06
相关资源
相似解决方案