为了账号安全,请及时绑定邮箱和手机立即绑定

Springboot启动报错

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).



Process finished with exit code 1


正在回答

4 回答

现在的版本基本都是2.1.9,与以前不同。所以必须配置数据库的url等信息,建议先将pom文件当中关于mybatis的注释掉运行。

0 回复 有任何疑惑可以回复我~
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
1 回复 有任何疑惑可以回复我~

pom中先注释掉与mybatis相关的

0 回复 有任何疑惑可以回复我~

这个是properties文件里面得数据库url没有配置

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

Springboot启动报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信