异常信息:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-03-24 15:58:03.177 ERROR 27492 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
Process finished with exit code 1

这个bug是我在写黑马程序员的品达通用权限的时候遇到的,意思是:
配置数据源失败:'url’属性未指定,无法配置任何嵌入的数据源。
原因是没有拉取到nacos里的配置文件导致运行失败
找到父maven发现实我的命名控件id忘了修改(dev环境下的)

找到nacos的命名空间修改一下就可以了


运行成功!
在编写黑马程序员品达通用权限模块时遇到一个异常,启动应用程序失败,原因是缺少数据源的'url'配置,且未能从Nacos加载配置。错误源于父Maven项目的命名控件ID未正确修改。解决方法是检查并修正Nacos命名空间中的设置,确保ID匹配。执行上述操作后,应用成功运行。

24万+

被折叠的 条评论
为什么被折叠?



