mybaties報錯:There is no getter for property named 'table' in 'class java.lang.String'

報錯是因爲xml裏獲取不到這個table參數java

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);
}
相關文章
相關標籤/搜索