報錯信息
- nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property 'params'. It was either not specified and/or could not be found for the javaType (java.util.Map) : jdbcType (null) combination.
### The error may exist in com/ruoyi/system/mapper/AccUserCredentialMapper.java (best guess)
### The error may involve com.ruoyi.system.mapper.AccUserCredentialMapper.insert
### The error occurred while executing an update
### Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property 'params'. It was either not specified and/or could not be found for the javaType (java.util.Map) : jdbcType (null) combination.
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property 'params'. It was either not specified and/or could not be found for the javaType (java.util.Map) : jdbcType (null) combination.
### The error may exist in com/ruoyi/system/mapper/AccUserCredentialMapper.java (best guess)
### The error may involve com.ruoyi.system.mapper.AccUserCredentialMapper.insert
### The error occurred while executing an update
### Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property 'params'. It was either not specified and/or could not be found for the javaType (java.util.Map) : jdbcType (null) combination.
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)
at com.sun.proxy.$Proxy157.insert(Unknown Source)
一般常見原因贺待,是因為實體類的寫法錯誤悬而,識別不來對應(yīng)的參數(shù)字段
@Data
@ToString
@EqualsAndHashCode(callSuper = false)
@TableName("acc_user_credential")
public class AccUserCredential implements Serializable{
private static final long serialVersionUID = 1L;
/** 主鍵ID */
@TableId(value = "id", type = IdType.INPUT)
private Long id;
/** 用戶ID */
private Long userId;
/** 用戶登陸類型 1手機號 2微信 3QQ 后面依次類推 */
private Integer loginType;
/** 登陸賬號 手機號 openid 等 */
private String loginAccount;
/** 密碼 加密密碼 */
private String credential;
}
@Data
@ToString
@EqualsAndHashCode(callSuper = false)
@TableName("acc_user_credential")
public class AccUserCredential implements Serializable{
private static final long serialVersionUID = 1L;
/** 主鍵ID */
@TableId(value = "id", type = IdType.INPUT)
private Long id;
/** 用戶ID */
private Long userId;
/** 用戶登陸類型 1手機號 2微信 3QQ 后面依次類推 */
private Integer loginType;
/** 登陸賬號 手機號 openid 等 */
private String loginAccount;
/** 密碼 加密密碼 */
private String credential;
}