Exception encountered during context initialization - cancelling refresh attempt:org.springframework
我这里是在springboot子模块里发生的错误,如下Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with.
·
我这里是在springboot子模块里发生的错误,如下
Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'dataShowController': Unsatisfied dependency expressed through field 'dataShowService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'dataShowServiceImp': Unsatisfied dependency expressed through field 'dauMapper';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'dauMapper' defined in file
...
Description:
Cannot determine embedded database driver class for database type NONE
Action:
If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).
在这里引起的直接原因很简单,就是因为这个子模块声明被莫名奇妙的从父模块pom文件里删除了。可能有的小伙伴在导入一些工程或按错快捷键时会遇到这样的弹框,或者像我一样某明奇妙的掉坑了。
然后是一脸问号?我没删这个模块呀,直接No或关闭会话框。然后运行时就出现上面的错误了,同时发现子模块的pom文件颜色变成了下面这个样子:
问前辈说是idea的bug,在此直接在父模块pom中手动添加子模块声明。如下:
<modules>
...
<module>dataShowWeb</module>
...
</modules>
刷新一下maven工程问题解决。
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)