mybaties报错:There is no getter for property named 'table' in 'class java.lang.String'
报错是由于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); }