MybatisPlusException: Error: Method queryTotal execution error.

先说明下情况,这是我自己遇到的一种情况。

我创建的表存在着关键字:DESC

下面贴下异常:(只贴部分,异常信息太多了没必要)

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Error: Method queryTotal execution error. ### The error may exist in com/seek/admin/mapper/SysLogMapper.java (best guess) ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Error: Method queryTotal execution error. at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) at com.sun.proxy.$Proxy87.selectList(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230) at com.baomidou.mybatisplus.core.override.PageMapperMethod.executeForMany2(PageMapperMethod.java:128) at com.baomidou.mybatisplus.core.override.PageMapperMethod.execute(PageMapperMethod.java:98

关键提示点:

Caused by: 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 'DESC,REQPARAMS,RESPPARAMS,USERID,USERNAME,METHOD,URI,IP,CREATETIME FROM sys_log' at line 1 at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)

修改了这个字段后。就可以正常了。

我估计应该是这个框架不支持出现关键字的情况。


			org.mybatis.spring.boot
			mybatis-spring-boot-starter
			1.3.2
		
		
			com.baomidou
			mybatis-plus-boot-starter
			3.0.1
		

 

你可能感兴趣的:(JAVA相关)