Mybatis异常信息如下:
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'sqlMap' in 'class java.lang.String'
解决方案一:在参数前加@Param标签
public Map<String, Object> selectLast(@Param("userCode") String userCode);
本文详细解析了Mybatis中出现的ReflectionException异常,特别是针对'没有名为sqlMap的getter方法'的问题。提供了有效的解决方案,即通过使用@Param注解来正确处理字符串参数。

312

被折叠的 条评论
为什么被折叠?



