我是靠谱客的博主 温暖心情,最近开发中收集的这篇文章主要介绍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所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复