org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userControll
来源:互联网 发布:csol重狙弹道优化 编辑:程序博客网 时间:2024/06/06 02:28
异常出现的场景:使用IDEA+MAVEN搭建SSM框架
这个异常困了我好几个小时,刚从坑里爬出来,特意做个标记,希望对大家有所帮助~
主要异常是:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot resolve reference to bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' while setting bean property 'transactionAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: warning no match for this type name: com.Service [Xlint:invalidAbsoluteTypeName]
解决办法是:
找到定义事务AOP配置的地方,如下,前面的是错误的,后面的才是正确的:
图1 错误的示范
图2 正确的示范
怪我之前愚昧,看见连续的两个".*"就下意识地觉得不必要……手贱……删除了。
这里补充一下知识点:
(* com.Service.*.*(..))中几个通配符的含义:
|第一个 * —— 通配 随便率性返回值类型|
|第二个 * —— 通配包com.Service下的随便率性class|
|第三个 * —— 通配包com.Service下的随便率性class的随便率性办法|
|第四个 .. —— 通配 办法可以有0个或多个参数|
参考博客【非常感谢博主的分享】:
http://blog.csdn.net/shipeng22022/article/details/40795095
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userControll
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name '***'
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework,beans.factory.BeanCreationException:error creating bean with name ***
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.
- 解决org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.spring
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- SSM创建MavenProject后,index.jsp报错
- 吴恩达学习-深层神经网络
- 位图和矢量图
- Linux的SOCKET编程详解
- python一句话之利用文件对话框获取文件路径
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userControll
- Just Do it
- 工作之余,放松心情
- Maven常用命令
- Android Studio快捷方式大全
- jenkins-fastlane 持续集成和自动化打包
- MapReduce常用三大组件
- 反转字符串02
- R中如何求众数