Error creating bean with name 'callSystemController': Unsatisfied dependency expressed through field

报错如下:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'callSystemController': Unsatisfied dependency expressed through field 'callSystemService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'CallSystemService': Unsatisfied dependency expressed through field 'callSystemDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'callSystemDao' defined in URL [jar:file:/D:/practice/po/Demo/demo-console/target/demo-console-1.0.0/WEB-INF/lib/demo-dao-1.0.0.jar!/com/huawei/promethues/demo/dao/CallSystemDao.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in URL [jar:file:/D:/practice/po/Demo/demo-console/target/demo-console-1.0.0/WEB-INF/lib/demo-dao-1.0.0.jar!/spring/spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [mybatis/mapper/CallSystem.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving JdbcType. Cause: java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.CHARACTER VARYING(128)

经过检查,,错误如下:mybatis中的mapper <resultMap>标签中jdbcType类型不对,将类型CHARACTER VARYING(128)改为VARCHAR.

并且从数据库查寻出来的结果为一个List,要将接口类型设置为List<Object>。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用中提到了一个错误信息"Error creating bean with name 'chartServiceImpl': Unsatisfied dependency expressed through field"。这个错误表示在创建名为'chartServiceImpl'的bean时,它的依赖没有得到满足。具体原因在于该bean的某个字段的依赖无法找到。然而,根据提供的引用内容,我没有找到与该错误具体相关的信息。为了解决这个问题,你可以尝试以下方法: 1. 检查'chartServiceImpl'的代码,特别是它的字段注入是否正确。确保依赖的字段被正确声明并且有相应的注解,如@Autowired或@Resource。还要确保依赖的类型正确,并且存在于Spring容器中。 2. 检查依赖的字段所在的类是否已经添加了相应的注解,比如@Service或@Repository。这些注解告诉Spring容器将这个类作为bean进行管理。 3. 检查依赖的字段的类型是否正确。如果类型不匹配,可能会导致依赖无法注入成功。 4. 如果以上步骤都没有解决问题,可以考虑检查相关实体的字段类型是否正确。如果字段类型错误,也可能导致依赖无法注入成功。 总之,要解决"Error creating bean with name 'chartServiceImpl': Unsatisfied dependency expressed through field"错误,你需要仔细检查代码中的依赖注入和相关注解,确保依赖的类型和声明都正确无误。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [解决异常Error creating bean with name ‘xxxxxController‘: Unsatisfied dependency expressed through ...](https://blog.csdn.net/weixin_46870864/article/details/128132222)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值