商业版Bladex.
把之前springblade开源版的业务模块迁移过来运行报错。
实体对象DictionaryFunction 没有继承BaseEntity.
() DictionaryFunction Serializable { = (type= IdType.) Long
Mapper继承的 mybatisplus的 basemapper
DictionaryFunctionMapper BaseMapper{ }
开源版运行没问题,商业版运行报错如下。
补充背景,使用的多数据源:
com.baomidou dynamic-datasource-spring-boot-starter 3.2.0
blade-common模块开启了多数据源配置。(参考帖子修改的,否则会提示找不到url)
```linux
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: SELECT id,function,name,template,type_id,threshold,compute_way,status,create_date,modify_date,scan_rate,is_set_coe FROM dictionary_function
WHERE (id IN (?,?,?,?,?,?))
### Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: SELECT id,function,name,template,type_id,threshold,compute_way,status,create_date,modify_date,scan_rate,is_set_coe FROM dictionary_function
WHERE (id IN (?,?,?,?,?,?))
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)
... 111 common frames omitted
Caused by: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: SELECT id,function,name,template,type_id,threshold,compute_way,status,create_date,modify_date,scan_rate,is_set_coe FROM dictionary_function
WHERE (id IN (?,?,?,?,?,?))
at com.baomidou.mybatisplus.core.toolkit.ExceptionUtils.mpe(ExceptionUtils.java:39)
at com.baomidou.mybatisplus.extension.parser.JsqlParserSupport.parserSingle(JsqlParserSupport.java:35)
at com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor.beforeQuery(TenantLineInnerInterceptor.java:69)
at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:61)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
at com.sun.proxy.$Proxy248.query(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
... 117 common frames omitted
Caused by: net.sf.jsqlparser.JSQLParserException: null
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:65)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:40)
at com.baomidou.mybatisplus.extension.parser.JsqlParserSupport.parserSingle(JsqlParserSupport.java:32)
... 122 common frames omitted
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "function" "FUNCTION"
at line 1, column 12.
Was expecting one of:
"!"
"("
"*"
```
扫一扫访问 Blade技术社区 移动端