Springboot项目启动报错Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded d
Posted java李杨勇
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Springboot项目启动报错Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded d相关的知识,希望对你有一定的参考价值。
***************************
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
解决方法:在url项目后加上如下配置信息:
useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8
url: jdbc:mysql://127.0.0.1:3306/springbootr0361?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8
还不行的话有时候idea编译器没有编译项目,需要手动build下或maven-package下就基本OK了
以上是关于Springboot项目启动报错Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded d的主要内容,如果未能解决你的问题,请参考以下文章
Springboot项目启动报错Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded d
SpringBoot中使用Kafka报错:Failed to construct kafka consumer
SpringBoot启动报错Failed to determine a suitable driver class
SpringBoot启动报错Failed to determine a suitable driver class
idea中的springboot的maven项目报错Failed to clean project: Failed to delete D: ew_shunyishunyi argetshun