才写了一行代码又报错了..


***************************
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})

转自:悟世君子的博客

最新文章

  1. mysql乐观锁总结和实践--转
  2. UIView--震动效果
  3. Oracle数据库基础知识2
  4. 【python】操作excel——xlrd xlwt xlutils
  5. IPC----消息队列
  6. dedecms手机站要同步pc站的图片
  7. JS-中对表单处理
  8. Extjs 实现输入数量,实时更改总价
  9. Windows 右键添加「cmd 打开」
  10. html5之datalist标签
  11. 【c#】RabbitMQ学习文档(六)RPC(远程调用)
  12. 推荐一个好用的E2E前端测试框架cypress
  13. 【原创】【状态压缩DP】POJ3254 Corn Fields【新手向】
  14. RandomAccessFile多线程下载
  15. HDU2066(SPFA+前向星)
  16. python之functools partial
  17. Entity Framework执行原生SQL语句
  18. ARP协议详解之Gratuitous ARP(免费ARP)
  19. Python 3 学习笔记(2)
  20. android 的AlertDialog对话框

热门文章

  1. 服务器上office不能正常使用?
  2. Qt调用VS生成的dll
  3. python现状
  4. K2 BPM_K2受邀出席SAP研讨会:共话“智能+”时代下的赋能与转型_全业务流程管理专家
  5. bash shell脚本之使用expr运算
  6. Spring Cloud(九)高可用的分布式配置中心 Spring Cloud Config 集成 Eureka 服务
  7. vs code 开发小程序会用到的插件
  8. Scala高阶函数与泛型
  9. 7. Function Decorators and Closures
  10. 原生js中如果有多个onload事件解决方案