报错:
Failed to configure a DataSource: ‘url’ attribute is not specified and no embedd

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

解决方法:

看了网上很多的教程,感觉都解决不了,代码又没啥错。
然后我就随意尝试一下:
拿了一个自己之前能运行出来的SpringBoot项目里面的yml文件里面的数据,如下。

spring:# 应用名称application:name: userthymeleaf:prefix:classpath: /templates/resources:#指定templates文件 映射 文件夹D盘目录下的data文件夹(映射路径注意不要写错了)static-locations: classpath:/templates,file:D:/userHead/#连接数据库datasource:username: rootpassword: 123456url: jdbc:mysql://localhost:3306/retallife?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTCdriver-class-name: com.mysql.cj.jdbc.DriverRedis:# 超时时间timeout: 10000ms# 服务器地址host: 127.0.0.1# 服务器端口port: 6379# 数据库database: 0#密码默认为空password:lettuce:pool:# 最大连接数,默认8max-active: 1024# 最大连接阻塞等待时间 ,默认-1max-wait: 10000ms#最大空闲连接max-idle: 200#最小空闲连接min-idle: 5#添加邮箱配置mail:# 客户端,邮件服务器地址。要是qq邮箱就是smtp.qq.comhost: smtp.163.com# 协议protocol: smtp# 编码格式default-encoding: utf-8# 发送者的邮箱地址username: wsw1335860166@163.com# 授权码(就是那串乱码)password: OJXEHZMKJASJXPTH# 端口port: 25#mybits-plus寻找对应的mapper映射
mybatis-plus:mapper-locations: classpath:mapper/*.xmltype-aliases-package: com.retallife.user.pojo#  <!--在使用MyBatis嵌套查询方式进行关联查询时,
#  使用MyBatis的延迟加载可以在一定程度上提高查询效率-->#实现Mybatis的延迟加载configuration:lazy-loading-enabled: true#false 为按需加载aggressive-lazy-loading: false# MyBatis SQL语句打印(方法所在接口的包,不是Mapper.xml所在的包)
Logging:level:com: debug# 应用服务 WEB 访问端口
server:port: 8081
#  servlet:
#    context-path: /retallife
#配置eureka注册中心地址
eureka:client:service-url:defaultZone: http://localhost:8761/eureka
#springboot的监控端点访问权限,*表示所有的访问端点都允许访问
management:endpoints:web:exposure:include: '*'

然后运行一遍发现可以运行。然后又ctrl+z返回,重新运行一遍之前出错的项目(代码没改),发现又可以了。
感觉应该是SpringBoot可能没识别到吧。
具体原因我也不知道,希望又大佬解决一下。

初步搭建微服务应用,报错:Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedd相关推荐

  1. springboot报错Failed to configure a DataSource url attribute is not specified and no embedd

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

  2. 报错:Failed to configure a DataSource: url attribute is not specified and no embedd

    Failed to configure a DataSource: 'url' attribute is not specified and no embedd 错误: 在网上由好几种解决方法,例如: ...

  3. 阿里连接池报错:Failed to configure a DataSource ‘url‘ attribute is not specified and no embedd

    阿里连接池报错:Failed to configure a DataSource: 'url' attribute is not specified and no embedd 明明已经配置数据库连接 ...

  4. Failed to configure a DataSource: ‘url’ attribute is not specified and no embedd

    初步搭建springboot应用,报错:Failed to configure a DataSource: 'url' attribute is not specified and no embedd ...

  5. SpringBoot 错误 : Failed to configure a DataSource: 'url' attribute is not specified and no embedd

    搭建springboot应用,报错:Failed to configure a DataSource: 'url' attribute is not specified and no embedd 查 ...

  6. Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedd.

    springboot启动报错:Failed to configure a DataSource: 'url' attribute is not specified and no embedd. Rea ...

  7. Failed to configure a DataSource: 'url' attribute is not specified and no embedd

    Failed to configure a DataSource: 'url' attribute is not specified and no em 无法配置DataSource:未指定'url' ...

  8. Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedd(究极踩坑完美解决)

    前言:Failed to configure a DataSource: 'url' attribute is not specified and no embedd这个错误想必大家已经非常非常熟悉了 ...

  9. 初次使用SpringBoot发现Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedd

    "Failed to configure a DataSource: 'url' attribute is not specified and no embedd" 意思为配置数据 ...

最新文章

  1. VMware学习使用笔记
  2. (二)Amazon Lightsail 部署LAMP应用程序之部署单片LAMP应用程序
  3. Springboot@Configuration和@Bean详解
  4. 探索Android中的Parcel机制(上) .
  5. python中string数据库_python – 将字节字符串保存到数据库中的v...
  6. 最全、最详细的配置jdk十步法!
  7. sap打勾选项记录_记录意外的开关选项
  8. 计算机二,八,十,十六进制转换
  9. windows下anaconda环境激活报错CommandNotFoundError: Your shell has not been properly configured to use ‘con
  10. Quartz使用-入门使用(java定时任务实现)
  11. 使用FlyMCU往STM32中烧写程序
  12. 超实用VS Code插件推荐
  13. MA1 轻轻松松学统计分析(上)
  14. 小米6X 线刷兼救砖_解账户锁_纯净刷机包_教程
  15. logisim 快速加法器设计实验报告_八位加法器设计实验报告
  16. 【MySQL】5.7新特性之七
  17. 随着人工智能发展的少儿编程教育
  18. ckeditor5 全屏功能
  19. Anthony_tester(博客链接)
  20. 2019 下半年 Flutter 实现的性能优化 | 英雄榜

热门文章

  1. HTML5 【第一天】
  2. Python:矩阵相乘
  3. Spinnaker第六节-开发和使用细节
  4. Linux 计算器 bc
  5. windows 系统重装
  6. 共享深度学习公司的四点提议
  7. Android基础 硬件加速和软件绘制 invalidate和RequestLayout流程
  8. Berlekamp–Massey算法简要介绍
  9. ZJOI2016一试游记
  10. 浅谈怎样保住数据最后的贞操