【Mybatis常见报错】

Mybatis,报错,was not registered for synchronization because synchronization is not active
optimize this sql to a count sql has exception,XXXXX,exception:
net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: “.” “.”
at line 22, column 11.

首先报这个错误,查看了自己的sql语句,没有问题,但是根据提示找到了对应的相应位置,【t1.format,】其实看不出来错误,后面发现format是mysql中的关键字,所以在写的时候应该就加上引号;如【t1.‘format’,】就是Tab键上面的那个引号,然后这样就没问题了,排查了半天结果是这个错误,所以特意记录下拉;
但是看到网上其他选手的解读为报冲突,解决方式如下:
https://blog.csdn.net/xiaozhang_man/article/details/127193780;
欢迎评论区留言讨论一下;

你可能感兴趣的:(mybatis,开发语言)