Failed to configure a DataSource 'url' attribute问题解决
2024-09-02 12:40:24
才写了一行代码又报错了..
***************************
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).
Disconnected from the target VM, address: '127.0.0.1:58792', transport: 'socket'
Process finished with exit code 0
未指定“url”属性,无法配置嵌入的数据源。
原因:由于添加了数据库组件,所以autoconfig会去读取数据源配置,新建的项目还没有配置数据源,所以会导致异常出现。
解决办法:
在启动类添加如下内容
即:@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
转自:悟世君子的博客
最新文章
- mysql乐观锁总结和实践--转
- UIView--震动效果
- Oracle数据库基础知识2
- 【python】操作excel——xlrd xlwt xlutils
- IPC----消息队列
- dedecms手机站要同步pc站的图片
- JS-中对表单处理
- Extjs 实现输入数量,实时更改总价
- Windows 右键添加「cmd 打开」
- html5之datalist标签
- 【c#】RabbitMQ学习文档(六)RPC(远程调用)
- 推荐一个好用的E2E前端测试框架cypress
- 【原创】【状态压缩DP】POJ3254 Corn Fields【新手向】
- RandomAccessFile多线程下载
- HDU2066(SPFA+前向星)
- python之functools partial
- Entity Framework执行原生SQL语句
- ARP协议详解之Gratuitous ARP(免费ARP)
- Python 3 学习笔记(2)
- android 的AlertDialog对话框
热门文章
- 服务器上office不能正常使用?
- Qt调用VS生成的dll
- python现状
- K2 BPM_K2受邀出席SAP研讨会:共话“智能+”时代下的赋能与转型_全业务流程管理专家
- bash shell脚本之使用expr运算
- Spring Cloud(九)高可用的分布式配置中心 Spring Cloud Config 集成 Eureka 服务
- vs code 开发小程序会用到的插件
- Scala高阶函数与泛型
- 7. Function Decorators and Closures
- 原生js中如果有多个onload事件解决方案