美文网首页
设置项目热部署的问题---Failed to auto-conf

设置项目热部署的问题---Failed to auto-conf

作者: 彩色帆 | 来源:发表于2018-11-12 16:46 被阅读0次

APPLICATION FAILED TO START

Description:

Failed to auto-configure a DataSource: 'spring.datasource.url' is not specified and no embedded datasource could be auto-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.

参考:https://www.jianshu.com/p/91376ce67c72

这是因为添加了数据库组件,所以autoconfig会去读取数据源配置,而我新建的项目还没有配置数据源,所以会导致异常出现。

即:@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})

相关文章

网友评论

      本文标题:设置项目热部署的问题---Failed to auto-conf

      本文链接:https://www.haomeiwen.com/subject/ncpcfqtx.html