springboot项目启动报错 url' attribute is not specified and no embedded datasource could be configured
报错相关信息:
2019-07-22 17:12:48.971 ERROR 8312 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : ***************************
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).
原因:maven父子聚合工程,pom父项目中如果添加了数据库驱动依赖的话,boot项目的autoconfig回去读取加载DataSource相关的配置,读取不到即报错。在一些新项目初始或者不需要db的项目(比如eureka)中,可配置boot的启动类:
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
排除DataSource的自动扫描装配。
springboot项目启动报错 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 embedde
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 embedded datasource could be configured.
新建了一个springboot项目报一下错误: Failed to configure a DataSource: 'url' attribute is not specified and no em ...
- 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 ...
- 新建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框架:'url' attribute is not specified and no embedded datasource could be configured问题处理
一.问题如下: Description: Failed to configure a DataSource: 'url' attribute is not specified and no em ...
- 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 ************ ...
- 记一次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 ...
- 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 ...
- Spring Boot 2.1.7 启动项目失败,报错: "Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured."
一开始按照网上的很多解决办法是: 启动类头部声明@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class}),但是这样会排除 ...
随机推荐
- 如何实现QQ附件在线预览功能
方法一:使用 openoffice 的接口把文档转换成html (linux主机或者windows主机): 方法二:使用 一个叫 jacob.jar 的工具,在安装了 office 的windows主 ...
- mybatis 源码分析(四)一二级缓存分析
本篇博客主要讲了 mybatis 一二级缓存的构成,以及一些容易出错地方的示例分析: 一.mybatis 缓存体系 mybatis 的一二级缓存体系大致如下: 首先当一二级缓存同时开启的时候,首先命中 ...
- python聚类算法解决方案(rest接口/mpp数据库/json数据/下载图片及数据)
1. 场景描述 一直做java,因项目原因,需要封装一些经典的算法到平台上去,就一边学习python,一边网上寻找经典算法代码,今天介绍下经典的K-means聚类算法,算法原理就不介绍了,只从代码层面 ...
- Linux 用户和组 权限管理 常用命令与参数
========================================================================== 1.基本概念: 所有者 : 一般为文件的创建者,谁 ...
- vs2019+cmake实现Linux远程开发
在上一篇文章中我们介绍了使用vs2019作为远程Linux系统的开发环境,但我们是创建的传统的sln项目,而对于Linux开发者来说以autotools或是cmake进行项目结构的组织更为简单直观,也 ...
- unity之中级工程师
主要是实际操作. Destroy(游戏对象):会真正销毁游戏对象. 动态链接库 热更新:用户不需要更新整个项目,只需要更新需要更新的部分,使用AssetBundle.PC,Android可以使用逻辑热 ...
- 一看就懂-Docker容器化
一.Docker简介 1.1 什么是docker docker的英文意思是 码头工人,意思就是搬运东西的意思,其实这和docker的特点是一样的,docker提供的就是一种容器化搬运东西(我们的软件. ...
- [2018CCPC吉林赛区(重现赛)- 感谢北华大学] 补题记录 躁起来
1007 High Priestess 埃及分数 1008 Lovers 线段树维护取膜意义下的区间s和. 每个区间保存前缀lazy和后缀lazy. #include <iostream> ...
- 模板汇总——Tarjian
1. 单向边 + 新图建边 int belong[N], dfn[N], low[N], now_time, scc_cnt; stack<int> s; void dfs(int u) ...
- 迷宫问题 POJ - 3984 [kuangbin带你飞]专题一 简单搜索
定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, ...