0
点赞
收藏
分享

微信扫一扫

SpringBoot启动报错

幸福的无所谓 2022-05-02 阅读 173
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-05-02 12:03:16.582 ERROR 15796 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

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})
public class SpringbootShiroApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootShiroApplication.class, args);
    }

}
举报

相关推荐

0 条评论