文章目录

  • 现象
  • 解决
    • 接触标志resources目录
    • 重新标志resources目录

现象

在做项目的过程中,需要区分几套环境,一般SpringBoot项目的配置文件也会进行分离,如下:

application-db-dev.yml
application-db-local.yml
application-dev.yml
application-local.yml
application.yml

现在拷贝一份local的作为dev环境的,然后再在application.yml更改spring.profiles.active=local,按理来说应该是可以直接启动的,但是却报错如下:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-05-06 23:35:15.267 ERROR 12944 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : ***************************
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 classAction: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).Process finished with exit code 1

由异常提示是数据库的连接地址没有找到,猜测是 application-db-local.yml 文件没有生效。

解决

接触标志resources目录

重新标志resources目录

IDEA报错 Failed to determine a suitable driver class相关推荐

  1. 报错解决:Reason: Failed to determine a suitable driver class

    背景: 导入别人的项目,却报错: Error starting ApplicationContext. To display the conditions report re-run your app ...

  2. 【Java异常】Failed to determine a suitable driver class

    本文目录 一.问题描述 二.问题原因 三.解决方案 方式1:配置文件排除 方式2:项目启动类排除 技术栈:Spring boot (2.1.5 RELEASE) + Mybatis plus(3.3. ...

  3. springcloud解决运行出现Failed to determine a suitable driver class

    找了一下午的大坑,终于被解决了!!!! 首先项目之前一直都是好好地,然后突然有个模块启动报错,错误如下: Caused by: org.springframework.beans.factory.Be ...

  4. Reason: Failed to determine a suitable driver class

    问题 报错信息如下: Failed to configure a DataSource: 'url' attribute is not specified and no embedded dataso ...

  5. Java DataSourceBeanCreationException: Failed to determine a suitable driver class问题解决

    问题描述: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationExcepti ...

  6. 若依微服务版在Windows上通过jar包运行业务模块时提示:Failed to determine s suitable driver class

    场景 若依微服务版后台服务通过jar包部署到Windows服务器: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/10962333 ...

  7. Springboot 抛出Failed to determine a suitable driver class异常原因

    Springboot 抛出Failed to determine a suitable driver class异常原因 参考文章: (1)Springboot 抛出Failed to determi ...

  8. SpringBoot 启动失败 Failed to determine a suitable driver class 问题解决方案

    SpringBoot 启动失败 Failed to determine a suitable driver class 问题解决方案 参考文章: (1)SpringBoot 启动失败 Failed t ...

  9. Failed to determine a suitable driver class

    项目场景: 微服务项目中,多个项目互相调用时,出现 Failed to configure a DataSource: 'url' attribute is not specified and no ...

最新文章

  1. Android UI开发第二十五篇——分享一篇自定义的 Action Bar
  2. html5实现获取地理位置信息并定位
  3. python绘制3d图-python3利用Axes3D库画3D模型图
  4. java list 替换 多线程_Java多线程处理List数据
  5. 消费金融资金断流,银行抽贷、通道暂停,P2P离场
  6. 我想变得富有的10个理由
  7. @scheduled注解配置时间_Spring Boot中使用@Scheduled创建定时任务
  8. LU分解的矩阵逆运算
  9. 在Visualforce页面中使用Visual Flow
  10. linux里卸载mysql数据库,Linux下卸载MySQL数据库
  11. 傅里叶变换与希尔伯特变换
  12. 各种常见数据传输线端口(插头)的分类
  13. java服务端集成腾讯IM 腾讯云通讯生成usersig的方法
  14. Python走心的42个代码例子
  15. html中3d图片轮播图,js实现图片3D轮播效果
  16. 新生报到管理系统,新生报到系统,大学生新生报到管理系统计算机毕业设计
  17. 【DP】饥饿的WZK(hunger)
  18. 新职业教育的三节课,凭什么做到今天这样
  19. 【tool】动态注释LOG_NDEBUG宏定义
  20. shell for循环命令行_七年老运维实战中的 Shell 开发经验总结

热门文章

  1. 实现n!+(n-1)!+...+1!
  2. android dropbear 密码,Android 利用dropbear工具 配置ssh服务
  3. 格式化工具indent使用笔记
  4. 2021年Android面经分享,面试总结
  5. 五年了,红取风霜实,青看雨露柯
  6. 与MOS管有关的各种知识
  7. Markdown表格/链接
  8. oracle-dba-控制文件和数据库启动
  9. word 为数学公式添加编号
  10. 一百多行 Python 代码手写蕃茄钟