Unsatisfied dependency expressed through method 'shirFilter' parameter 0 异常排查

摘要:
最近在sprootboot的项目中将使用mybatisplus框架中的代码生成模块中,执行完代码生成程序以后,运行程序后报一下错误:org.springframework.beans.factory.UnsatisfiedDependencyException:Errorcreatingbeanwithname'shirFilter'definedinclasspathresource[com/m

最近在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 这个属性:

Unsatisfied dependency expressed through method 'shirFilter' parameter 0 异常排查第1张

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

Unsatisfied dependency expressed through method 'shirFilter' parameter 0 异常排查第2张

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

免责声明:文章转载自《Unsatisfied dependency expressed through method 'shirFilter' parameter 0 异常排查》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇SpringSecurity(四): 动态认证用户信息UserDetailsServicewebview loadRequest下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

SpringBoot启动时让方法自动执行的几种实现方式

在springBoot中我们有时候需要让项目在启动时提前加载相应的数据或者执行某个方法,那么实现提前加载的方式有哪些呢?接下来我带领大家逐个解答 1.实现ServletContextAware接口并重写其setServletContext方法 实现ServletContextAware 注意:该方法会在填充完普通Bean的属性,但是还没有进行Bean的...

理解 Spring(二):AOP 的概念与实现原理

什么是 AOP AOP 的基本术语 Spring AOP 的简单应用 Spring AOP 与动态代理 Spring AOP 的实现原理(源码分析) 扩展:为什么 JDK 动态代理要求目标类必须实现接口 什么是 AOP AOP(Aspect Oriented Programming,面向切面编程)是一种编程范式,它是对 OOP(Object O...

Spring框架第一天(搭建项目)

Spring框架 1.简介 1.1 Spring是什么 一个开源的框架,是JavaEE开源框架 Spring是分层的 Java SE/EE应用 full-stack 轻量级开源框架,以IoC(Inverse Of Control:反转控制)和AOP(Aspect Oriented Programming:面向切面编程)为内核。 提供了展现层 Spring...

Java ActiveMQ 讲解(二)Spring ActiveMQ整合+注解消息监听

对于ActiveMQ消息的发送,原声的api操作繁琐,而且如果不进行二次封装,打开关闭会话以及各种创建操作也是够够的了。那么,Spring提供了一个很方便的去收发消息的框架,spring jms。整合Spring后,代码不仅变得非常优雅,而且易用性和扩展性更好。 1. maven依赖 <!-- activemq -->...

【转】java异常报错大全

算术异常类:ArithmeticExecption 空指针异常类:NullPointerException 类型强制转换异常:ClassCastException 数组负下标异常:NegativeArrayException 数组下标越界异常:ArrayIndexOutOfBoundsException 违背安全原则异常:SecturityExceptio...

普通Java类获取spring 容器的bean的5种方法

本文转载自:http://www.cnblogs.com/duanxz/archive/2014/06/18/3794075.html 方法一:在初始化时保存ApplicationContext对象方法二:通过Spring提供的工具类获取ApplicationContext对象方法三:继承自抽象类ApplicationObjectSupport方法四:继承...