mybatis There is no getter for property named 'xxxx' in 'class java.lang.Integer

mybatis查询 是传参 报

 There is no getter for property named 'xxxx' in 'class java.lang.Integer

 这里是传入一个integer类型的参数,结果报上述异常

以下为sql写法:

	select  top ${contentSize} MAX(PrimaryKeyId) as id FROM  Content_TEMP  GROUP BY id 
		

 此处报

There is no getter for property named 'contentSize' in 'class java.lang.Integer

解决方法有二:

   1.将 参数名称 "contentSize" 替换为"_parameter" 

   结果正常。

   2. 在接口中定义方法时 增加“@Param("contentSize")” 标记

    即:

 List<xxxx>  selectContent(@Param("contentSize")int contentSize);

    结果正常。

猜你喜欢

转载自it456.iteye.com/blog/1676864