报错如下:org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource’ defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: warning no match for this type name: service [Xlint:invalidAbsoluteTypeName]
Caused by: java.lang.IllegalArgumentException: warning no match for this type name: [Xlint:invalidAbsoluteTypeName]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource’ defined in class path resource [spring-core-config.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: warning no match for this type name: params [Xlint:invalidAbsoluteTypeName]
Related cause:
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name ‘shiroFilter’: Requested bean is currently in creation: Is there an unresolvable circular reference?
解决:
<aop:pointcut /> 中execution 函数配置错误
或者注解中pointcut中类名全路径或函数名或参数类型或参数名称不匹配错误导致:
此类型名称不匹配
参数非法:没有与类型匹配的参数
一般可能是类名、类路径哪里有问题,先确认一下。

本文解析了在Spring框架中遇到的Bean创建异常问题,详细分析了错误信息中提到的‘dataSource’Bean初始化失败的原因,指出可能是由于配置文件applicationContext.xml或spring-core-config.xml中的执行函数配置错误,或者是注解中pointcut的类名全路径、函数名、参数类型或参数名称不匹配所导致。同时,文章还提到了可能存在的循环依赖问题。
2万+

被折叠的 条评论
为什么被折叠?



