Jireh程序猿的那些事 Jireh程序猿的那些事

记录分享生活、程序、信息的精彩人生

目录
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "with" "WITH"
/  

Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "with" "WITH"

同事写了个SQL遇到了这个问题,帮他解决了下

xxxxx group by name with ROLLUP

原因是框架中,有用到多租户的功能,Mybatis-plus 会 进行数据权限的过滤。要对该条sql,进行租户放行。

在Mapper上添加注解,解决

@SqlParser(filter=true)`

如果觉得这篇文章不错的话,请我喝一杯 咖啡☕吧
标题:Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "with" "WITH"
作者:Jireh
地址:https://jireh.xyz/articles/2022/04/01/1648806706513.html
本作品由 Jireh 采用 署名 – 非商业性使用 – 禁止演绎 4.0 国际许可协议进行许可,转载请注明出处。