Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property 'id' of 'class 。。。
java.lang.IllegalArgumentException: argument type mismatc

解决方法:

实体类上加上了主键自增策略

@TableId(type = IdType.AUTO)

public Integer id;

或者在配置文件中全局配置

mybatis-plus:

  global-config:

    db-config:

      id-type: AUTO