完整报错
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
解决
启动类修改
@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
原因
找不到数据源的配置,springboot默认是自动注入数据源,但现在找不到,修改注解后不让其自动注入数据源。
版权声明:本文为qq_37356556原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。