document.write("");

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,然后重新运行即可

posted @ 2022-02-06 09:06  人间春风意  阅读(582)  评论(0编辑  收藏  举报