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)
...
這是構造方法忘記寫時報的錯,雖然很基礎,但是不要初心大意。對於這種錯誤,應儘量避免,所謂的代碼質量就是從這些細節上提高的。