报错原因:
TDengine 建一个超级表, 使用了自定义SQL,可能含有特殊的函数或者复杂的语法,因而不被JSqlParser(SQL解析器)所支持(无法添加租户id之类的字段),以致抛出了JSQLParserException。
Failed to process, please exclude the tableName or statementId
翻译过来就是:处理失败,请将表名或者语句id进行排除。
实则为集成 mybats-plus多租户插件出的问题
解决办法:
//Mapper的类/方法上使用 忽略多租户注解 @InterceptorIgnore(tenantLine = "true") //低版本可以使用 在mybatis-plus 3.4中标记为过时 @SqlParser(filter = true)
demo:
MyBatis-plus多数据源 集成Mysql和TDengine的测试工程
参考:
TDengine JAVA连接文档
解决MyBatisPlus报错:Failed to process, please exclude the tableName or statementId
mybatis-plus3.4x 多租户屏蔽某个特定mapper的方法@InterceptorIgnore
MyBatis-Plus的多租户以及SqlParserFilter注意点



