错误日志:
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 ;
sql 语句错误 主要看 'near’附近的错误 ,一般都是语句有问题,多点 多分号啥的
但是 使用分页插件请不要 再输出所有的Sql语句后添加分号,因为会动态在后面拼接Limit 进行分页
在不使用插件的sql语句是可以添加分号的
Log4j;
log4j使用教程,将log4j的配置文件直接放在Dao层下resources的文件下即可!
在spring 和 springMybaties 整合的环境下!