SpringBoot启动异常:Reason: Failed to determine a suitable driver class
Posted tbUoky
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SpringBoot启动异常:Reason: Failed to determine a suitable driver class相关的知识,希望对你有一定的参考价值。
程式之前都运行正常,忽然一天运行报错:
*************************** 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).
也不知道是什么原因,配置文件不起作用了,
所以在 Project Structure中查看一下 Modules,发现果然,src -> main -> resources这个文件夹,不是Resources的类型
修改其为 Resources,然后重新运行即可
以上是关于SpringBoot启动异常:Reason: Failed to determine a suitable driver class的主要内容,如果未能解决你的问题,请参考以下文章
异常解决——SpringBoot项目启动卡住,无任何异常信息