spring boot mybatis 批量更新

批量更新(三:foreach成多條sql):https://zhuanlan.zhihu.com/p/135839992

 

用@update 註解會報錯誤:sql injection violation, multi-statement not allow 

數據源: druid

 

決絕方案在在druid yml層級下添加

druid:
    filter:
        wall:
            config:
                multi-statement-allow: true
            db-type: mysql
            enabled: true

參考鏈接:

https://www.pianshen.com/article/22731886228/

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章