找不到主数据库Invocation of init method failed; nested exception is com.baomidou.dynamic.datasource.exception

问题1说明:时隔半个月没用,jeecgboot跑起来的时候报这个错了,Invocation of init method failed; nested exception is com.baomidou.dynamic.datasource.exception

意思是找不到主数据库,公司的数据库不太稳定,所以找到这篇文章,https://blog.csdn.net/weixin_46277254/article/details/121464932

解决:说是要注释掉application-dev.yml文件中

validationQuery: SELECT 1
testWhileIdle: true

问题2说明:注释掉以后启动,提示如下:Command line is too long. Shorten command line for JeecgSystemApplication or also for Spring Boot de。

我把注释去掉了,还是一样的提示↑

然后解决这个问题,参考 https://blog.csdn.net/liufeifeihuawei/article/details/131382597

解决:

(1)点击"run"-> “edit configuration”
在这里插入图片描述
(2)找到"Environment"->“Shorten command line”,并选择下拉列表中的"JAR manifest"
(3)点击"Apply"->"OK"即可

这个解决后可以启动了,一脸懵逼



posted @ 2024-04-28 16:07  爱吐泡泡的小小鱼  阅读(44)  评论(0编辑  收藏  举报