天天看點

springboot 整合flowable6.4 系列 遇到的坑 ${blobType} selectModelByParameters No message available

一、解決flowable6.4 整合報

Caused by: java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.${blobType}

啥情況,怎麼突然報這個錯?

先看看源碼。flowable6.4 中有一個xml 是這樣的

springboot 整合flowable6.4 系列 遇到的坑 ${blobType} selectModelByParameters No message available

這裡就有一個jdbcType 是動态傳遞進去的,如何解決這個問題呢?

jar 資源

yml 配置

springboot 整合flowable6.4 系列 遇到的坑 ${blobType} selectModelByParameters No message available

搞定!

二、解決flowable6.4報 

 java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for org.flowable.ui.modeler.domain.Model.selectModelByParameters

啥情況,又出來這個錯!真是坑多!

先看看源碼

springboot 整合flowable6.4 系列 遇到的坑 ${blobType} selectModelByParameters No message available

看了源碼很快就能發現問題,其實不看源碼隻能知道出錯的原因是因為掃描不到 DAO 對應的 xml 配置檔案,那為什麼會掃描不到呢?原因在于,首先我們需要看看自己的項目裡面存放mapper 配置檔案的路徑,部落客如下:

springboot 整合flowable6.4 系列 遇到的坑 ${blobType} selectModelByParameters No message available

我這個mapper 下肯定沒有那個方法的配置檔案,怎麼辦呢?其實看了包的路徑你會發現,三個配置檔案是在 META-INF/modeler-mybatis-mappings 下面 的,是以解決方案為:在mybatis的mapper-locations 多增加一個路徑,記住英文逗号分隔

springboot 整合flowable6.4 系列 遇到的坑 ${blobType} selectModelByParameters No message available

三、flowable6.4 報  No message available

好不容易解決了上面兩個坑,終于可以看到界面,激動之下,去新增一個模型試試

springboot 整合flowable6.4 系列 遇到的坑 ${blobType} selectModelByParameters No message available

當你輸入完之後你會發現,報錯了,提示 No message available

springboot 整合flowable6.4 系列 遇到的坑 ${blobType} selectModelByParameters No message available

這個問題終端會輸出空指針,主要原因是什麼呢?檢視源碼發現

springboot 整合flowable6.4 系列 遇到的坑 ${blobType} selectModelByParameters No message available
springboot 整合flowable6.4 系列 遇到的坑 ${blobType} selectModelByParameters No message available

分析源碼會發現其實是使用者的id 取不到,引發的空指針,進一步推斷,鑒權沒有破解,或者說,免登陸出了問題,或者是系統本身對擷取使用者的方法進行了權限控制。怎麼解決呢?首先我們需要找到擷取使用者的路徑位址。找到如下圖檔位址。

springboot 整合flowable6.4 系列 遇到的坑 ${blobType} selectModelByParameters No message available

部落客這裡自行改過了,根據實際情況定。然後根據位址背景新增一個方法

如有疑問請聯系部落客:微信:xljx_888888 QQ:275300091