最近自己写了一份代码签入到github,然后拉下来运行报下面的错误

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
-- ::02.246 ERROR --- [ 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). Process finished with exit code

调试了很久发现是配置文件没有生效,找到一篇文章(https://blog.csdn.net/ht_kasi/article/details/82259860)后来才发现根本原因

resouce文件夹失效 ,图标与正常的不一样

解决方法,右键resouces文件夹,设置为resouces root即恢复正常

记一次Spring boot集成mybatis错误修复过程 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.的更多相关文章

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

  2. 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 ************ ...

  3. 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}),但是这样会排除 ...

  4. 详解Spring Boot集成MyBatis的开发流程

    MyBatis是支持定制化SQL.存储过程以及高级映射的优秀的持久层框架,避免了几乎所有的JDBC代码和手动设置参数以及获取结果集. spring Boot是能支持快速创建Spring应用的Java框 ...

  5. 【spring boot】14.spring boot集成mybatis,注解方式OR映射文件方式AND pagehelper分页插件【Mybatis】pagehelper分页插件分页查询无效解决方法

    spring boot集成mybatis,集成使用mybatis拖沓了好久,今天终于可以补起来了. 本篇源码中,同时使用了Spring data JPA 和 Mybatis两种方式. 在使用的过程中一 ...

  6. Spring Boot集成MyBatis开发Web项目

    1.Maven构建Spring Boot 创建Maven Web工程,引入spring-boot-starter-parent依赖 <project xmlns="http://mav ...

  7. spring boot集成mybatis(1)

    Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...

  8. spring boot集成mybatis(2) - 使用pagehelper实现分页

    Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...

  9. spring boot集成mybatis(3) - mybatis generator 配置

    Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...

随机推荐

  1. Detectron2源码阅读笔记-(三)Dataset pipeline

    构建data_loader原理步骤 # engine/default.py from detectron2.data import ( MetadataCatalog, build_detection ...

  2. Mybatis JdbcType与Oracle、MySql数据类型对

    Mybatis JdbcType Oracle MySql JdbcType ARRAY     JdbcType BIGINT   BIGINT JdbcType BINARY     JdbcTy ...

  3. LCD裸板编程_框架

    lcd程序框架: 为了让程序更好的扩展,介绍面向对象编程: 比如抽象出lcd_3.5和lcd_4.3的共同点: 当我想使用3.5寸的lcd时,只需让lo指向lcd_3.5_opr即可.同样,当我想使用 ...

  4. (HK1-2)海康相机直接连接电脑不经过路由器设置

    解决电脑无法通过网线直连海康摄像机的问题 https://blog.csdn.net/u014552102/article/details/86708371 一.现象:    通过博主的另外一篇博客h ...

  5. ZROI 暑期高端峰会 A班 Day4 生成函数

    一般生成函数 很普及组,不讲了 生成函数是一种形式幂级数,也就是我们只关心系数,不关心未知数具体的值. 比如 \(\sum\limits_{i\ge 0}x^i=\frac{1}{1-x}\).虽然只 ...

  6. springmvc,controller层在接收浏览器url传来的参数带中文乱码问题。

    请求地址:http://localhost:8080/saveFlashSale?fsRemark=哈哈哈哈哈 接收方法:@RequestMapping("/saveFlashSale&qu ...

  7. HTML5 - 开发一个自己的websocket服务器

    应用:node.js 主要步骤: 创建文件夹 创建app.js(server入口,app为自定义命名) npm init -y (快速创建一个package.json文件) 依赖包安装:nodejs- ...

  8. OpenSSL创建证书

    使用OpenSSL创建证书.采用的OS为CentOS7. 1. 修改OpenSSL的配置文件 vim /etc/pki/tls/openssl.cnf [ CA_default ] dir = /et ...

  9. 【IntelliJ IDEA学习之二】IntelliJ IDEA常用配置

    版本:IntelliJIDEA2018.1.4 一.常用配置两张概览图(1)工作区总览介绍图 (2)setting配置图 --------------------------------------- ...

  10. c# 大白话告诉你Thread的Sleep和Join的区别

    我们的程序默认会有两个线程,一个是主线程,一个是负责垃圾回收的线程.如果代码不使用多线程,就只有主线程这一条干道.1.在主线程中调用Thread.Sleep(1000),表示主线程阻塞自己1秒.2.在 ...