Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedd(究极踩坑完美解决)
Posted Adorable_Rocy
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedd(究极踩坑完美解决)相关的知识,希望对你有一定的参考价值。
前言:Failed to configure a DataSource: ‘url’ attribute is not specified and no embedd这个错误想必大家已经非常非常熟悉了,关于数据库配置的问题,但是这种错误还有一种坑,随我来看
1.对于这个错误,一般是没有配置数据源导致
spring:
datasource:
# 当前数据源操作类型
type: com.alibaba.druid.pool.DruidDataSource
# mysql驱动类
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/db_info?useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: root
2.在pom文件中,自动生成了打包模式为pom模式,删除即可
问题得到完美解决!
以上是关于Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedd(究极踩坑完美解决)的主要内容,如果未能解决你的问题,请参考以下文章
struts报错严重: Dispatcher initialization failed Unable to load configuration.
Failed to upgrade Oracle Cluster Registry configuration(root.sh)
安装Intel HAXM:"failed to configure driver unknown error. failed to open driver"
Failed to configure a DataSource 'url' attribute问题解决
springboot启动报错:Failed to configure a DataSource
Springboot Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded