zoukankan      html  css  js  c++  java
  • Unsatisfied dependency expressed through method 'shirFilter' parameter 0 异常排查

     最近在sprootboot的项目中将使用mybatisplus框架中的代码生成模块中,执行完代码生成程序以后,运行程序后报一下错误:org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shirFilter' defined in class path resource [com/mingqi/author/shiro/config/ShiroConfig.class]: Unsatisfied dependency expressed through method 'shirFilter' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityManager' defined in class path resource [com/mingqi/author/shiro/config/ShiroConfig.class]: Unsatisfied dependency expressed through method 'getDefaultWebSecurityManager' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bdpUserRealm': Unsatisfied dependency expressed through field 'isAuUserService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.mingqi.author.service.impl.SAuUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'SAuUserMapper' defined in URL [jar:file:/D:/maven/repository/com/mingqi/framework/author/2.0.4/author-2.0.4.jar!/com/mingqi/author/dao/SAuUserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:workService argetclassesmapperReviewtitleTalBatchMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [D:workService argetclassesmapperReviewtitleTalBatchMapper.xml]'. Cause: java.lang.IllegalStateException: No typehandler found for property batchcontext

    刚开始一直以为是文件名和框架jar包中封装类的名字重复了或者是类的名称和mapper中的xml的文件不一致导致的,检查了一遍又一遍,还是没有发现问题。最后知道无意间看到了Cause: java.lang.IllegalStateException: No typehandler found for property batchcontext 这句话,大致的意思是说找不到属性的类型处理程序,然后我就在ReviewtitleTalBatchMapper.xml这个文件中找到了batchcontext 这个属性:

     去对应的ReviewtitleTalBatch 实体类中看了一下他的类型为:Blob,如下图(该类型由代码生成器自动生成的,为oracle数据库中的大字段的类型):

     在Java中没有这个类型,尝试将该类型修改为String,同时修改对应的get和set方法,然后重新启动项目,启动成功。

  • 相关阅读:
    安装vue-cli最新版后,无法使用console方法的解决办法
    使用yarn 安装 vue.js devtools(2020.1.6)
    在路由切换后 将滚动条置顶
    标签页 elementUI 激活时的颜色 怎样改 很坑爹!
    页面滚动鼠标产生动画 wow.js 在vue中
    CSS多行文本溢出隐藏,显示省略号
    ... 扩展运算符
    this的指向的一些问题
    用for循环和用for-in循环遍历数组最大的区别
    数组的indexOf、forEach、map、filter、方法的理解
  • 原文地址:https://www.cnblogs.com/mingqi-420/p/14706523.html
Copyright © 2011-2022 走看看