Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.在初步搭建springboot应用,因为没有进行数据库配置,如地址值,数据库驱动,用户名,密码等,常常会出现上述错误,表示是无法配置DataSource:未指定‘URL’属性,无法配置嵌入数据源。

Springboot最大的一个好处就是自动配置,所以我们只需要配置相关属性的值,它就会自动配置,配置在application.properties文件中。

#访问根路径#应用名称
spring.application.name=springboot-stxcx#访问端口号
server.port=8080#编码格式
server.tomcat.url-encoding=utf-8#数据库相关配置
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/stxcx
spring.datasource.username=root
spring.datasource.password='123456'
spring.datasource.max-idle=10
spring.datasource.max-wait=10000
spring.datasource.min-idle=5
spring.datasource.initial-size=5#session生命周期
server.servlet.session.timeout=30m

当然,如果此时你还不想配置,你也可以声明一下
启动类头部声明:

@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})

感谢观看,如果有帮到小伙伴,请点赞哦!!!

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问题

    参考这篇:https://blog.csdn.net/qq_40223688/article/details/88191732 或我抄下来了: Failed to configure a DataSo ...

  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 If you want an ...

  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

    阿里连接池报错: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. 初次使用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" 意思为配置数据 ...

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

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

  9. 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' ...

最新文章

  1. GPU高性能编程CUDA实战(二)
  2. 一个DBA的工作写照
  3. java.security.InvalidKeyException:illegal Key Size
  4. ED/EP系列5《消费指令》
  5. Android 网络知识必知必会
  6. 1114D . Flood Fill
  7. Spring Cloud Stream如何处理消息重复消费
  8. python可以构建sem模型_python-分组的熊猫DataFrames:如何将scipy.stats.sem应用于它们?...
  9. in、at和on作为时间介词_23
  10. SpringSecurity-1-AuthenticationFailureHandler接口(登录失败之后的处理逻辑)
  11. 官网链接下载QT5 Creator
  12. 计算机无法访问u盘,U盘“无法访问” 也能轻松修复
  13. 谷歌浏览器配置微信浏览器_在 Chrome (谷歌浏览器) 中模拟微信内置浏览器
  14. Java 导出excel进行换行
  15. 判断类型是否继承_读《Java核心技术》-继承(覆盖、final、强制类型转换、抽象类)...
  16. 排序算法——冒泡排序(JavaPython)
  17. 【Flask】官方教程(Tutorial)-part2:蓝图-视图、模板、静态文件
  18. HTTP/HTTPS 请求与防抓包
  19. 守护软件供应链安全:国产软件BinSearch的最佳实践
  20. 请允许ActiveX控件和页面其他部分交互

热门文章

  1. 第15届中国科学家论坛在京召开,优牌生物科技有限公司获科技创新发明奖
  2. 云南一货车乘客街头撒尿 殴打劝阻协警
  3. ipad flash_为什么您不能在iPad上安装Flash(以及该怎么做)
  4. ts语音自建服务器,请高手教教我怎么建设TS语音服务器
  5. 被我们误读的诗句《静夜思》
  6. Python3.X 爬虫实战(静态下载器与解析器)
  7. 你应该学会如何标记有序列表
  8. 七月在线 金融风控系统实战
  9. Android Studio学习(十九)--前后端分离
  10. vue三级导航栏利用自定义属性data-*和事件委派优化