栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

解决以Error: GlobalConfigUtils setMetaData Fail ! 为基础的嵌套问题(包括common troller,commonservice等问题)

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

解决以Error: GlobalConfigUtils setMetaData Fail ! 为基础的嵌套问题(包括common troller,commonservice等问题)


run程序后出现了这个问题

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commonService': Unsatisfied dependency expressed through field 'commonDao'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commonDao' defined in file [C:springboot-schematargetclassescomdaoCommonDao.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/spring/boot/starter/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 com.baomidou.mybatisplus.exceptions.MybatisPlusException: Error: GlobalConfigUtils setMetaData Fail !  Cause:java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

它很长,而且总是会出现nest,原来是嵌套问题,这个是我看这篇文章了解的

https://blog.csdn.net/qq_50541673/article/details/123617180?ops_request_misc=&request_id=&biz_id=102&utm_term=Error%20creating%20bean%20with%20name%20&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-1-123617180.142^v13^rank_v32,157^v14^new_3&spm=1018.2226.3001.4187

 然后我就找到了最根本的错误(嵌套里的最后一个),它的意思是我数据库没连上

Caused by: com.baomidou.mybatisplus.exceptions.MybatisPlusException: Error: GlobalConfigUtils setMetaData Fail !  Cause:java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

 我看了一下我的application.yml,原来是我的密码没加‘’单引号,导致数据库连不上,无语了。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/970529.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号