[Solved] JavaErrors_mybatis collection column Pass Value Error

Error instantiating class java.lang.Integer with invalid types () or values (). Cause: java.lang.NoSuchMethodException: java.lang.Integer.()

1. Background: when multiple parameter values are passed into the column of collection in mybatis, an error is reported
2. Solution:
an entity class in your one to many relationship. In the corresponding mapper.xml, the parametertype of SQL method must be in the form of map

<select id="getMaskRuleByMaskStrategyId" parameterType="java.util.Map" resultMap="MaskRuleResultWithMaskTypeMap">
        select * from t_capaa_maskstrategy_mask_strategy_conf a left join t_capaa_maskstrategy_mask_rule b on a.mask_rule_id = b.id
        where mask_strategy_id = #{maskStrategyId,jdbcType=INTEGER}
</select>

Solution:

Be sure to type parametertype as map, otherwise, in the column of the collection tag, you cannot use the format of {K1 = V1, K2 = V2} .

Read More: