Failed to configure a DataSource 'url' attribute问题解决
才写了一行代码又报错了..
***************************
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:58792', transport: 'socket'
Process finished with exit code 0
未指定“url”属性,无法配置嵌入的数据源。
原因:由于添加了数据库组件,所以autoconfig会去读取数据源配置,新建的项目还没有配置数据源,所以会导致异常出现。
解决办法:
在启动类添加如下内容
即:@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
转自:悟世君子的博客
Failed to configure a DataSource 'url' attribute问题解决的更多相关文章
- SpringBoot 2.0 报错: Failed to configure a DataSource: 'url' attribute is not specified and no embe
问题描述 *************************** APPLICATION FAILED TO START *************************** Description ...
- 新建springboot项目启动出错 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
错误信息入下: 2018-06-23 01:48:05.275 INFO 7104 --- [ main] o.apache.catalina.core.StandardService : Stopp ...
- springboot启动报错 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
新建了一个springboot项目报一下错误: Failed to configure a DataSource: 'url' attribute is not specified and no em ...
- 记一次Spring boot集成mybatis错误修复过程 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
最近自己写了一份代码签入到github,然后拉下来运行报下面的错误 Error starting ApplicationContext. To display the conditions repor ...
- SpringBoot使用mybatis,发生:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured
最近,配置项目,使用SpringBoot2.2.1,配置mybatis访问db,配好后,使用自定义的数据源.启动发生: APPLICATION FAILED TO START ************ ...
- springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde
springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde 创建 ...
- Spring Boot错误——SpringBoot 2.0 报错: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
背景 使用Spring Cloud搭建微服务,服务的注册与发现(Eureka)项目启动时报错,错误如下 *************************** APPLICATION FAILED T ...
- 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 消费者提示需要配置数据源
使用 由于给前端做分页 在启动消费者的时候遇到了这个问题 Failed to configure a DataSource: 'url' attribute is not specified and ...
- SpringBoot项目刚刚创建就报异常,Failed to configure a DataSource: 'url' attribute is not specified and no embedded 的解决办法
错误信息: Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedde ...
随机推荐
- VisualVM的使用
1.解压压缩包(如visualvm143.zip) 2.修改etc/visualvm.conf 中的visualvm_jdkhome配置 3.双击bin/visualvm.exe 4.安装插件,可能一 ...
- hbulider 快捷键
跳转到行 Ctrl + G 页首 Ctrl + Home 页尾 Ctrl + End 下一个选项卡 Ctrl + Tab 上一个 ...
- PLSQL导出表结构和数据的三种方式
1.导出表结构和数据方式1.tools->export user objects是导出表结构 tools ->export user object 选择选项,导出.sql文件 说明:导出的 ...
- C++ STL 之 map
#include <iostream> #include <map> using namespace std; // map构造函数 // map<T1, T2> ...
- 关于写SQL语句的技巧
一.SQL总结写法 SQL的写法无非就是几种,关联查询,子查询,分组函数,各种函数的使用 1.首先根据要做的需求,先分析一下,需要用到哪些查询,例如要用到关联查询,就先把用到的表列出来,比如a,b,c ...
- poi的基本导入
一.获取列的值 private String getCell(Cell cell){ if(null == cell){ return ""; } try{ cell.setCel ...
- 【url ---lib___】笔趣阁(抓取斗罗大陆完整)和(三寸天堂)
# coding=gbk #因为在黑屏下执行,所以代码会使用GBK url='http://www.biquge.info/10_10218/' UA={"User-Agent": ...
- 【Day4】3.urllib模块使用案例
import urllib.request as ur ret = ur.urlopen('https://edu.csdn.net/').read() with open('edu.html','w ...
- Linux基础篇之FTP服务器搭建(二)
上一篇文章说到了搭建FTP匿名用户的访问,接下来讲解一下本地用户的登录. 一.首先先建立一个用户,这里举例:xiaoming,并为其设置密码. 二.修改配置文件. 文件:ftpusers 文件:us ...
- PAT Basic 1049 数列的片段和 (20 分)
给定一个正数数列,我们可以从中截取任意的连续的几个数,称为片段.例如,给定数列 { 0.1, 0.2, 0.3, 0.4 },我们有 (0.1) (0.1, 0.2) (0.1, 0.2, 0.3) ...