当前位置:网站首页>Error creating bean with name xxx Factory method ‘sqlSessionFactory‘ threw exception; nested excepti
Error creating bean with name xxx Factory method ‘sqlSessionFactory‘ threw exception; nested excepti
2022-06-23 14:58:00 【Gripper】
Abnormal log :
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxx': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxx': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'payRequestServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'payRequestMapper' defined in file [E:\code\xxx\xxx\target\classes\orm\mapper\XxxMapper.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.apache.ibatis.type.TypeException: The alias 'Entity' is already mapped to the value 'com.xxx.Entity'.
as a result of MybatisPlus Of typeAliasesPackage The scope of entity scanning package configuration is too large , Lead to spring Two containers with the same name are injected when the container is started Bean Report errors .
terms of settlement :
take .yml In the configuration file mybatis-plus.typeAliasesPackage Narrow the scope of , for example :mybatis-plus.typeAliasesPackage = com.**.**.po
Other methods , You can also use the same name Bean Modify one of the names , In this way, no error will be reported when starting . However, this method can cure the symptoms but not the root causes .
边栏推荐
- 2021-05-08
- General sequence representation learning in kdd'22 "Ali" recommendation system
- 【深入理解TcaplusDB技术】TcaplusDB构造数据
- 2021-05-22
- [Level 2 warranty] which brand of Fortress machine is good for Level 2 warranty?
- [deeply understand tcapulusdb technology] tcapulusdb import data
- Distributed database uses logical volume to manage storage expansion
- What do you mean by waiting for insurance records? Where should I go for filing?
- 用OBS做直播推流简易教程
- Quick view of wechat applet development process
猜你喜欢

Uniswap 收购 NFT交易聚合器 Genie,NFT 交易市场将生变局?

Technology sharing | do you understand the requirements of the tested project?

General sequence representation learning in kdd'22 "Ali" recommendation system

Soaring 2000+? The average salary of software testing in 2021 has come out, and I can't sit still

今年英语高考,CMU用重构预训练交出134高分,大幅超越GPT3

Effect evaluation of regression model under credit product quota pricing scenario

raspberry pi安装 wiringpi

The company has only one test, but the leader asked me to operate 1000 mobile numbers at the same time

Un million de bonus vous attend, le premier concours d'innovation et d'application de la Chine Yuan cosmique Joint Venture Black Horse Hot Recruitment!

2021-05-08
随机推荐
As a software testing practitioner, do you understand your development direction?
Golang -- multiple processing scenarios for files
JSP_ SSM Wanfu cinema ticket sales management system, including paper [demonstration video]
等保备案是什么意思?应该去哪里办理备案?
ts封装请求
掌舵9年,艾伦研究所创始CEO光荣退休!他曾预言中国AI将领跑世界
[in depth understanding of tcapulusdb technology] tcapulusdb business data backup
go语言的变量声明
聚合生态,使能安全运营,华为云安全云脑智护业务安全
中国矿大团队,开发集成多尺度深度学习模型,用于 RNA 甲基化位点预测
MySQL 创建和管理表
百万奖金等你来拿,首届中国元宇宙创新应用大赛联合创业黑马火热招募中!
AI talk | data imbalance refinement instance segmentation
The principle of redis cache consistency deep analysis
【深入理解TcaplusDB技术】TcaplusDB业务数据备份
2021-06-03
Test article
ACM Player Illustration leetcode remove element
Analysis and solution of connection failure caused by MySQL using replicationconnection
Test article