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 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相关推荐
- 初步搭建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 ...
- 初步搭建微服务应用,报错: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 ...
- 报错: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 错误: 在网上由好几种解决方法,例如: ...
- 阿里连接池报错: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 明明已经配置数据库连接 ...
- 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 查 ...
- 初次使用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" 意思为配置数据 ...
- 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 ...
- 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 ...
- 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' ...
最新文章
- GPU高性能编程CUDA实战(二)
- 一个DBA的工作写照
- java.security.InvalidKeyException:illegal Key Size
- ED/EP系列5《消费指令》
- Android 网络知识必知必会
- 1114D . Flood Fill
- Spring Cloud Stream如何处理消息重复消费
- python可以构建sem模型_python-分组的熊猫DataFrames:如何将scipy.stats.sem应用于它们?...
- in、at和on作为时间介词_23
- SpringSecurity-1-AuthenticationFailureHandler接口(登录失败之后的处理逻辑)
- 官网链接下载QT5 Creator
- 计算机无法访问u盘,U盘“无法访问” 也能轻松修复
- 谷歌浏览器配置微信浏览器_在 Chrome (谷歌浏览器) 中模拟微信内置浏览器
- Java 导出excel进行换行
- 判断类型是否继承_读《Java核心技术》-继承(覆盖、final、强制类型转换、抽象类)...
- 排序算法——冒泡排序(JavaPython)
- 【Flask】官方教程(Tutorial)-part2:蓝图-视图、模板、静态文件
- HTTP/HTTPS 请求与防抓包
- 守护软件供应链安全:国产软件BinSearch的最佳实践
- 请允许ActiveX控件和页面其他部分交互