报错是由于xml里获取不到这个table参数

package com.xxx.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface UserMapper { User getUserById(long id); // @Select("select * from user_auth_0 ") // 查询所有,改为xml
List<User> findAll(); /**
* 加@Param("table") 解决问题: org.apache.ibatis.reflection.ReflectionException:
* There is no getter for property named 'table' in 'class java.lang.String'
* @param table
* @return
*/
int createTableTest(@Param("table") String table);
}

mybaties报错:There is no getter for property named 'table' in 'class java.lang.String'的更多相关文章

  1. MyBatis if test 传入一个数字进行比较报错 There is no getter for property named 'userState' in 'class java.lang.Integer'

    在写MyBatis映射文件中,我要传入一个 int 类型的参数,在映射文件中用 'test' 中进行比较,我花了很长时间百度,发现都是不靠谱的方法,有把数字在比较时转成字符串用 equals 比较的. ...

  2. mybaits错误解决:There is no getter for property named 'parentId ' in class 'java.lang.String'

    在使用mybaitis传参数的时候,如果仅传入一个类型为String的参数,那么在 xml文件中应该使用_parameter来代替参数名. 比如mapper中如下方法,只有一个String值 publ ...

  3. SSM框架报错分析(一)——There is no getter for property named 'XXX' in 'class java.lang.String'

    一.发现问题 <select id="queryStudentByNum" resultType="student" parameterType=&quo ...

  4. 【Mybatis】mybatis查询报错org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'areaName' in 'class java.lang.String'

    mybatis查询报错: Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for pro ...

  5. 已解决: mybatis报错 org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'xxx' in 'class java.lang.String'

    最近在练习MyBatis时 进行姓名的模糊查询时候出现 org.apache.ibatis.exceptions.PersistenceException: ### Error querying da ...

  6. MyBatis3: There is no getter for property named 'code' in 'class java.lang.String'

    mybatis3  : mysql文如下,传入参数为string类型时‘preCode’,运行报错为:There is no getter for property named 'preCode' i ...

  7. mybatis之org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'time' in 'class java.lang.String'

    mybatis接口 List<String> getUsedCate(String time); 配置文件 <select id="getUsedCate" pa ...

  8. mybatis问题: There is no getter for property named 'equipmentId' in 'class java.lang.String'

    本文来源于翁舒航的博客,点击即可跳转原文观看!!!(被转载或者拷贝走的内容可能缺失图片.视频等原文的内容) 若网站将链接屏蔽,可直接拷贝原文链接到地址栏跳转观看,原文链接:https://www.cn ...

  9. Mybatis中传参包There is no getter for property named 'XXX' in 'class java.lang.String'

    Mybatis中传参包There is no getter for property named 'XXX' in 'class java.lang.String' 一.发现问题 <select ...

随机推荐

  1. Dubbo+Zookeeper实现简单的远程方法调用示例

    1. Dubbo介绍 示例代码:Github 1.1 RPC Remote Procedure Call:远程过程调用 1.2 Dubbo架构 Subscribe 订阅:签署:赞成 Monitor 监 ...

  2. 计算机组成原理——cache高速缓存存储器

    转载自https://blog.csdn.net/chen1083376511/article/details/8187481 cache-高速缓存存储器 在主存与CPU之间插入一级或多级SRAM组成 ...

  3. idea创建maven的web项目

    前言 今天搭xfire的时候,我想对xfire进行一下测试,就想弄个web工程试试,发现网上写的很多没有用的,就自己写了一下.十分精简.也介绍了如何解决maven骨架建立项目非常慢的问题. 介绍 1. ...

  4. Razor_06 列表的查询

    Razor_06 列表的查询 列表的查询 同步/AJAX 查询 分局部视图[强类型] system.text.Json  Ajax 返回 Json 数据 , System.Text.Json .循环引 ...

  5. startsWith(),endsWith()判断当前字符串是否是以给定字符串开始或结尾的

    package seday01;/** * boolean startsWith(String str) * boolean endsWith(String str) * 判断当前字符串是否是以给定字 ...

  6. Create an XAF Application 创建一个XAF应用程序

    This topic describes how to use the Solution Wizard to create XAF applications and specify a connect ...

  7. JavaWeb之Servlet(3)

    Servlet(3) HttpServletRequest 该类的对象封装了所以客户端提交过来的数据 获取所有请求头数据 public java.util.Enumeration<E> g ...

  8. JS基础语法---分支语句之:if语句,if-else语句,if-ever if语句

    //if语句只有一个分支 //if-else语句有两个分支,最终执行一个分支 //if-else if-else if-else if-else if..........else---多分支,最终也是 ...

  9. 用redis和cookie做单用户登录

    因为公司的项目需要用到单用户登录,于是今天用redis和cookie给系统添加了单用户登录功能,再次简单记录一下. 单用户登录是为了防止同一账户在不同电脑和不同浏览器里面同时登录.所以我这边的思路是: ...

  10. apache jmeter 使用

    ======================= 插件 ======================= 在JMeter 中很多东西都是基于插件技术的, 所以扩展性非常好, 比如下面这些东西都是插件: 1 ...