zoukankan      html  css  js  c++  java
  • 构造方法忘记写时junit报错

    org.apache.ibatis.exceptions.PersistenceException: 
    
    ### Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: No constructor found in com.tszhao.dao.User matching [java.lang.Integer, java.lang.String, java.lang.Integer]
    ### The error may exist in com/tszhao/mapper/UserMapper.java (best guess)
    ### The error may involve com.tszhao.mapper.UserMapper.selectUser
    ### The error occurred while handling results
    ### SQL: select * from users where id=?
    ### Cause: org.apache.ibatis.executor.ExecutorException: No constructor found in com.tszhao.dao.User matching [java.lang.Integer, java.lang.String, java.lang.Integer]
    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
    ...


    这是构造方法忘记写时报的错,虽然很基础,但是不要初心大意。对于这种错误,应尽量避免,所谓的代码质量就是从这些细节上提高的。

  • 相关阅读:
    一周内签到连续天数求解
    int型动态数组总结
    快速排序总结
    希尔排序总结
    冒泡排序的总结
    桶排序总结
    插入排序的总结
    选择排序的总结
    二分法的五种实现
    安装Yum源
  • 原文地址:https://www.cnblogs.com/Z2978/p/12805922.html
Copyright © 2011-2022 走看看