启动报这个错误是什么问题
来源:2-2 创建 SpringBoot 项目

HaganWu
2023-12-01
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).
3回答
-
Howiedu
2024-02-20
这个我觉得还是换成和老师一样的版本吧,我用JDK17也有这个问题,换成了14+java11,springboot版本也调到2.几就可以正常跑了。。
00 -
慕码人8147685
2023-12-01
同学我也是这个问题,我在EmosWxApiApplication.java在这里注解后面加了括号的内容
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
这要就不报错了但是也没从根本解决问题
你解决了踢我一下哈哈
022025-03-08 -
神思者
2023-12-01
估计是yml文件中的MYSQL配置的不对
032023-12-02
相似问题