here is no getter for property named ‘shopname’ in ‘class java.lang.String’",“code”:500
或运行时异常:
Could not set parameters for mapping: ParameterMapping{property=’_parameter’, mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId=‘null’, jdbcTypeName=‘null’, expression=‘null’}
模糊查询传参问题:
错误写法:
select * from shop where shopname like "%${shopname}%"
select * from shop where shopname like "%#{_parameter}%"
正确写法:使用$符号,参数改为_parameter
<select id="selectSearch" parameterType="String" resultType="map">
select * from shop where shopname like "%${_parameter}%"
</select>