There is no getter for property named 'containerId' in 'class java.lang.String'

IBATIS传入单个字符参数时报错:

There is no getter for property named 'containerId' in 'class java.lang.String'

解决方法:

接口参数之前加上@Param("containerId")

List<ConPort> selectConport(@Param("containerId")String containerId)

xml:

 <select id="selectConport" resultMap="BaseResultMap" parameterType="java.lang.String" >

    select 

    <include refid="Base_Column_List" />

    from dop_con_port

    where 1=1

    <if test="containerId!=null ">

    And CONTAINER_ID = #{containerId,jdbcType=VARCHAR}

    </if>

  </select>

猜你喜欢

转载自mayh-1126.iteye.com/blog/2321916
今日推荐