java后端自学错误总结
一.SpringBoot–正在总结中
1.循环嵌套异常
今天再写SpringCloud项目的时候书写测试类运行结果报错了报错的最后的信息是
The dependencies of some of the beans in the application context form a cycle:
newsConfigController (field private com.shengkong.article.service.newsConfigService com.shengkong.article.controller.v1.newsConfigController.newsConfigService)
↓
newsConfigServiceImpl (field protected com.baomidou.mybatisplus.core.mapper.BaseMapper com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.baseMapper)
↓
newsConfigMapper defined in file [E:\shengkong\shengkongtoutiao\shengkong_news\shengkong_news-view\target\classes\com\shengkong\article\mapper\NewsConfigMapper.class]
↓
sqlSessionFactory defined in class path resource [com/shengkong/seata/config/DataSourcesProxyConfig.class]
┌─────┐
| dataSourceProxy defined in class path resource [com/shengkong/seata/config/DataSourcesProxyConfig.class]
↑ ↓
| druidDataSource defined in class path resource [com/shengkong/seata/config/DataSourcesProxyConfig.class]
↑ ↓
| org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker
Error creating bean with name 'druidDataSource' defined in class path resource [com/shengkong/seata/config/DataSourcesProxyConfig.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'dataSourceProxy': Requested bean is currently in creation: Is there an unresolvable circular reference?
2.项目起来卡住了怎么办
这个时候可以考虑看看是不是idea的断点导致的可以将断点取消掉再去重启项目,目前遇到这种情况