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.数据库是否能连接上,用工具试试。

目录
打赏
0
0
0
0
81
分享
相关文章
成功解决Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings
这篇文章提供了解决Spring Initializr网站初始化失败问题的方法,包括检查URL、网络和代理设置。
成功解决Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could
这个错误通常出现在使用Spring Boot进行数据库连接时。错误信息表明Spring Boot未能配置一个DataSource,因为没有指定'url'属性,并且没有发现默认的数据库连接。
548 0
【Mac 系统】解决已有清华镜像但出现CondaHTTPError: HTTP 000 CONNECTION FAILED for url
在尝试使用清华镜像创建conda环境时遇到下载超时问题,通过删除原有镜像并添加针对Mac OS的清华镜像解决了该问题。
228 3
|
10月前
|
Springboot用JUnit测试接口时报错Failed to determine a suitable driver class configure a DataSource: ‘url‘
Springboot用JUnit测试接口时报错Failed to determine a suitable driver class configure a DataSource: ‘url‘
206 0
【已解决】SpringBoot 启动报错:Failed to configure a DataSource: ‘url‘ attribute is not specified and no emb
【已解决】SpringBoot 启动报错:Failed to configure a DataSource: ‘url‘ attribute is not specified and no emb
3271 0
前端JS截取url上的参数
文章介绍了两种前端JS获取URL参数的方法:手动截取封装和使用URLSearchParams。
105 0
Asp.net Webapi 的 Post 方法不能把参数加到 URL 中?试试这样写
Asp.net Webapi 的 Post 方法不能把参数加到 URL 中?试试这样写
109 0
|
8月前
|
JAVA 获取 URL 指定参数的值
JAVA 获取 URL 指定参数的值
82 0
URL编码【详解】——Javascript对URL进行编码解码的三种方式的区别和使用场景,axios请求拦截器中对get请求的参数全部进行URL编码
URL编码【详解】——Javascript对URL进行编码解码的三种方式的区别和使用场景,axios请求拦截器中对get请求的参数全部进行URL编码
456 0
|
9月前
|
js 获取并解析 url 中参数的三种方法
js 获取并解析 url 中参数的三种方法
908 0

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等