SpringBoot启动出错

Spring-boot项目新建出错时

ror starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-01-28 12:25:47.982 ERROR 2856 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
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.
    If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).

d with exit code 0

解决办法

启动类的注解改为

@SpringBootApplication (exclude= {DataSourceAutoConfiguration.class})

发布了15 篇原创文章 · 获赞 3 · 访问量 783

猜你喜欢

转载自blog.csdn.net/qq_37158147/article/details/104098897