一、项目启动报错*************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource:urlattribute 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 withexitcode1二、解决思路初步看报错以为是数据库挂了结果用navicat连接了一下线上数据库没问题。我什么配置都没动、代码也没改检查了一下数据库配置的也没问题所以代码和配置的问题就被我排除了。在网上搜了一下在启动类上可以加上excludeDataSourceAutoConfiguration.class则SpringBootApplication(exclude DataSourceAutoConfiguration.class)。试了一下果然不靠谱。三、报错原因经排查因为报错出现的位置是springboot启动报错所以我猜想应该还是跟配置相关。重新勾选开发环境。重新update一下项目。成功解决~~~