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 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工程问题解决。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值