Eagerly caching bean '' to allow for resolving potential circular references
tomcat启动时卡在:
一般这样的问题是两个原因:
1. 数据库连接不上;
2. mapper.xml 中有错误,比如单词拼写错误;
这个问题不是,采取的方法是 把项目的日志级别调整为debug模式,查看详细打印信息:
DEBUG o.s.b.factory.support.DefaultListableBeanFactory - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean
with name 'crashMetaLogDAO' defined in URL [jar:file:/D:/dev_software/workplace/gitWorkplace/appupgrade/app-upgrade-admin/target/app-upgrade-admin/WEB-INF/lib/app-upgrade-module-1.0-SNAPSHOT.jar!
/com/bbkmobile/iqoo/appupgrade/statistic/crashdata/dao/CrashMetaLogDAO.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': :
No qualifying bean of type [org.apache.ibatis.session.SqlSessionFactory] is defined: expected single matching bean but found 2: sqlSessionFactory,statisticSqlSessionFactory;
nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.apache.ibatis.session.SqlSessionFactory] is defined:
expected single matching bean but found 2: sqlSessionFactory,statisticSqlSessionFactory
DEBUG o.s.b.factory.support.DefaultListableBeanFactory - Returning cached instance of singleton bean 'sqlSessionFactory'
DEBUG o.s.b.factory.support.DefaultListableBeanFactory - Returning cached instance of singleton bean 'statisticSqlSessionFactory'
DEBUG o.s.b.factory.support.DefaultListableBeanFactory - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean
with name 'userDAO' defined in URL [jar:file:/D:/dev_software/workplace/gitWorkplace/appupgrade/app-upgrade-admin/target/app-upgrade-admin/WEB-INF/lib/app-upgrade-core-1.0-SNAPSHOT.jar!
/com/bbkmobile/iqoo/appupgrade/core/user/dao/UserDAO.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': :
No qualifying bean of type [org.apache.ibatis.session.SqlSessionFactory] is defined: expected single matching bean but found 2: sqlSessionFactory,statisticSqlSessionFactory;
nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.apache.ibatis.session.SqlSessionFactory] is defined:
expected single matching bean but found 2: sqlSessionFactory,statisticSqlSessionFactory
DEBUG o.s.b.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'crashMetaLogDAO'
DEBUG o.s.b.factory.support.DefaultListableBeanFactory - Creating instance of bean 'crashMetaLogDAO'
DEBUG o.s.b.factory.support.DefaultListableBeanFactory - Eagerly caching bean 'crashMetaLogDAO' to allow for resolving potential circular references
2017-02-12 20:48:54.040 DEBUG o.s.b.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'userDAO'
2017-02-12 20:48:54.040 DEBUG o.s.b.factory.support.DefaultListableBeanFactory - Creating instance of bean 'userDAO'
2017-02-12 20:48:54.040 DEBUG o.s.b.factory.support.DefaultListableBeanFactory - Eagerly caching bean 'userDAO' to allow for resolving potential circular references
statistic-spring-mybatis.xml
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage"
value="xxx.xxx.xxx.statistic.*.dao"/>
</bean>
spring-mybatis.xml
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage"
value="xxx.xxx.xxx.x.core.*.dao"/>
</bean>
两个spring-mybatis.xml 的MapperScannerConfiguer中 都没有指定sqlSessionFactory。
---------------------
作者:sumi
来源:CSDN
原文:https://blog.csdn.net/wconvey/article/details/55006768
版权声明:本文为博主原创文章,转载请附上博文链接!
Eagerly caching bean '' to allow for resolving potential circular references相关推荐
- Spring Boot flyway的启动时机比较早
flyway,如果已经创建的版本V1中已经更新,则会validation报错 at org.springframework.boot.devtools.restart.RestartLauncher. ...
- 【Spring源码分析系列】bean的加载
前言 以 BeanFactory bf = new XmlBeanFactory(new ClassPathResource("beans.xml"));为例查看bean的加载过 ...
- Spring读书笔记——bean创建(下)
有关Spring加载bean系列,今天这是最后一篇了,主要接上篇对于从Spring容器中获取Bean的一些细节实现的补充. <Spring读书笔记--bean加载>--Spring如何加载 ...
- Spring IOC 容器源码分析 - 创建单例 bean 的过程
1. 简介 在上一篇文章中,我比较详细的分析了获取 bean 的方法,也就是getBean(String)的实现逻辑.对于已实例化好的单例 bean,getBean(String) 方法并不会再一次去 ...
- spring bean的生命周期和创建流程
一.从composeScan注解中扫描到新类或者@BEAN中得到新类,并将beanDefinner注册到容器工厂中. 二.在refreshContext中会创建实例.AbstractAutowireC ...
- Spring Ioc源码分析 之 Bean的加载(5):循环依赖处理(populateBean())
首先回顾下Bean加载的主流程: 1.如果是单例模式,从factoryBeanInstanceCache 缓存中获取BeanWrapper 实例对象并删除缓存 2.调用 createBeanInsta ...
- Spring Ioc 之 Bean的加载(3):createBean()
createBean()是创建Bean的关键方法 一.createBean() 代码: //AbstractAutowireCapableBeanFactory.java protected Obje ...
- Spring IoC 源码系列(四)bean创建流程与循环依赖问题分析
创建单例 bean 的代码细节在 org.springframework.beans.factory.support.AbstractBeanFactory#getBean 中,getBean 顾名思 ...
- AbstractAutowireCapableBeanFactory 类对容器生成的Bean 添加后置处理器
BeanPostProcessor 后置处理器的调用发生在Spring IOC 容器完成对Bean 实例对象的创建和属性的依赖注入完成之后,在对Spring 依赖注入的源码分析过程中我们知道,当应用程 ...
最新文章
- 【Android OpenGL ES】阅读hello-gl2代码(二)Java代码
- 论前端工程师如何应对西电教学评估系统
- python报错输出到日志_Python日志记录和子进程输出和错误流
- 使用相对长度单位em布局网页内容
- Maven本地库添加Oracle JDBC驱动
- [教程]Tensorflow + win10 + CPU + Python3.6+ 安装教程
- 解决Linux CentOS中cp -f 复制强制覆盖的命令无效的方法
- 【转】crc16几种标准校验算法及c语言代码
- 拓端tecdat|R语言指数加权模型EWMA预测股市多变量波动率时间序列
- android创建vcf格式,C#生成vcf 文件源代码 QuotedPrintable 解码支持中文支持Android-vcf文件怎么打开...
- swift 与objective-c区别
- Jena TDB Assembler
- 股票实战分析专题-金融量化初级练习使用
- JavaScript 获取当前是周几
- android-手势密码
- 基于Nginx以及web服务器搭建在线视频播放
- 重装mysql 重启服务service mysqld restart一直卡着怎么解决Redirecting to /bin/systemctl restart mysqld.service
- matplotlib | Python强大的作图工具,让你从此驾驭图表
- 【LeetCode每日一题】810. 黑板异或游戏
- 基于RocketMQ设计秒杀