springboot启动项目报错,应该是数据库连接的问题,导致无法启动。
我找了好多文章,发现错的地方其实差不多,但是还有一个地方,就是删除 target目录,再重新运行就可以了
删除搞定!
***************************
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).
本文记录了SpringBoot项目启动时遇到的数据库连接配置错误,表现为因未指定'DataSource'的'url'属性导致启动失败。尝试了多种解决办法,包括检查数据库设置、激活特定配置文件等。最终,通过删除target目录并重新构建项目解决了问题。这可能是由于编译后的资源冲突导致的。建议在遇到类似问题时,首先检查数据库连接配置,并考虑清理项目构建输出。
6029

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



