> 注意: 这是个人遇见错误
项目类型:微服务单机
场景复现:
***************************
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).
错误原因:
我正在写gateway网关的拦截部分需要使用jwt,其中网关需要另一个模块的jwt工具类,一开始我是直接引用,即在pom文件中引入依赖。之后看教程这种仅仅一个微服务使用的情况下,直接复制jwt工具类到现在gateway模块中就行,防止打包的时候产生依赖循环,结果我就是直接复制了,但是pom文件中的依赖我没有删除,导致了这个错误,很奇怪的错误。
解决方案:
直接删除pom中重复的依赖