我是靠谱客的博主 温暖心情,这篇文章主要介绍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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(67)

评论列表共有 0 条评论

立即
投稿
返回
顶部