1. 程式人生 > >mybatis 異常 There is no getter for property named 'bizId' in 'class java.lang.Long'

mybatis 異常 There is no getter for property named 'bizId' in 'class java.lang.Long'

img 技術分享 .com mybatis lan alt nbsp pro 錯誤

mybatis 異常 There is no getter for property named ‘bizId‘ in ‘class java.lang.Long‘

當使用mybatis進行傳參的時候,參數只有一個時會出現這種類似的錯誤。

解決:

1.接口定義出,指定參數名

技術分享

2.在xml 中指定類型

技術分享

mybatis 異常 There is no getter for property named 'bizId' in 'class java.lang.Long'