Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could

简介: Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could

问题:先来看看异常SpringBoot启动的时候出现的异常信息

***************************

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).

Disconnected from the target VM, address: '127.0.0.1:65525', transport: 'socket'

Process finished with exit code 0

解决:

1.检查pom.xml 项目数据库jar 是否引用;

2.查看**.properties或**.yml 配置文件是否配置数据库链接池;

3.查看spring - datasource - url 配置的地址格式错误需要转义等;yml或者properties文件可能没有被扫描到(情况比较少,如果按照标准命名都会被默认扫描);

4.数据库是否能连接上,用工具试试。

相关文章
|
1月前
|
Java 数据库连接 Spring
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could
这个错误通常出现在使用Spring Boot进行数据库连接时。错误信息表明Spring Boot未能配置一个DataSource,因为没有指定'url'属性,并且没有发现默认的数据库连接。
31 0
|
16天前
|
缓存 JavaScript
报错:cannot read properties of undefined “reading url“
报错:cannot read properties of undefined “reading url“
|
1月前
|
Java 数据库
【问题记录(已解决)】springboot整合ssm报错‘url‘ attribute is not specified and no embedded datasource
【问题记录(已解决)】springboot整合ssm报错‘url‘ attribute is not specified and no embedded datasource
|
8月前
|
关系型数据库 MySQL Java
Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
解决方法: 配置H2数据库或者MySQL数据库,其中配置MySQL解决方法如下: 1、添加 MySQL连接驱动的依赖 Maven工程在pom.xml中添加
225 0
|
8月前
|
druid Java
SpringBoot整合Druid报错记录:Failed to configure a DataSource: ‘url‘ attribute is not specified and no embe
SpringBoot整合Druid报错记录:Failed to configure a DataSource: ‘url‘ attribute is not specified and no embe
|
9月前
|
Java Maven Spring
Failed to configure a DataSource: ‘url‘ attribute is not specified and no Reaso(附解决思路)
Failed to configure a DataSource: ‘url‘ attribute is not specified and no Reaso(附解决思路)
208 0
|
Java 数据库连接 mybatis
mybatis报错:Type handler was null on parameter mapping or property ‘__frch_xxx_0’
mybatis报错:Type handler was null on parameter mapping or property ‘__frch_xxx_0’
1578 0
mybatis报错:Type handler was null on parameter mapping or property ‘__frch_xxx_0’
|
10月前
|
Java Spring
Failed to configure a DataSource
Failed to configure a DataSource
77 0
Failed to configure a DataSource
|
数据库
Failed to configure a DataSource: url attribute is not specified and no embedded datasource could...
Failed to configure a DataSource: url attribute is not specified and no embedded datasource could...
Failed to configure a DataSource: url attribute is not specified and no embedded datasource could...
Could not resolve placeholder jdbc.driver in string value ${jdbc.driver}
Could not resolve placeholder jdbc.driver in string value ${jdbc.driver}
177 0