测试Springboot时报了这个错误
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'loginController': Unsatisfied dependency expressed through field 'userService';
上网搜了解决方法,大多数原因是缺少接口实现类上注解@Service导致注入失败,或者Mapper.xml文件中注释不规范。
找了半天,也没找到自己想要的答案。
后来不经意间看到了这个错误信息:
Error resolving JdbcType. Cause: java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.int
原来是JdbcType不支持int类型啊。。。换成INTEGER后重启立马好了
看来错误信息还是要仔细看啊,不能一报错就直接上网找解决方法。
浪费我几个小时,长记性了。