记一次配置内容丢失导致报错问题:Error creating bean with name ‘servletEndpointRegistrar’ defined in class path resource …

  • 报错内容:
 Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthEndpoint]: Factory method 'healthEndpoint' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorAutoConfiguration':Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorAutoConfiguration$$EnhancerBySpringCGLIB$$caa88ea6]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource': Post-processing of FactoryBean's singleton object failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
  • 问题关键在最后一句:
   Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class

笔者也是在Error creating bean with name ‘servletEndpointRegistrar’ defined in class path resource
报错纠结许久,降低过spring boot版本,替换报错jar与依赖包,更换maven版本、仓库,事实都是无用

  • 这种问题可能是你的spring.datasource driverClassName等信息没有配置

      spring.datasource.druid.read.driverClassName = com.mysql.cj.jdbc.Driverspring.datasource.druid.read.url=jdbc:mysql://localhost:3306/mydb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8spring.datasource.druid.read.username=rootspring.datasource.druid.read.password=123456
    
  • 还可能是你的jdbc依赖问题,是否有添加:

         <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-jdbc</artifactId>  </dependency>
    

Error creating bean with name 'servletEndpointRegistrar' defined in class path resource相关推荐

  1. Error creating bean with name ‘servletEndpointRegistrar‘ defined in class path resource

    记录一下 今天在写为服务项目碰到的错误,如下面所示,只知道创建Error creating bean with name 'servletEndpointRegistrar' defined in c ...

  2. 启动springboot报错Error creating bean with name 'dataSource' defined in class path resource

    2019独角兽企业重金招聘Python工程师标准>>> 启动springboot报错Error creating bean with name 'dataSource' define ...

  3. Meavn 搭建项目遇到Error creating bean with name 'sessionFactory' defined in class path resource...

    Error creating bean with name 'sessionFactory' defined in class path resource .nested exception is j ...

  4. BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [

    现场情景: 初次搭建springboot工程,原本要搭建一个springboot+mybatis的maven工程,听说springboot会把一切给配置好,天真的在执行完mybatis自动生成mapp ...

  5. Error creating bean with name ‘redisConnectionFactory‘ defined in class path resource

    1.问题描述 在redis整合springcache的时候一直报错. 按照信息找的发生问题的部分: @Configuration @EnableCaching public class RedisCo ...

  6. Error creating bean with name ‘entityManagerFactory‘ defined in class path resource解决方案

    Error creating bean with name 'entityManagerFactory' defined in class path resource解决方案 参考文章: (1)Err ...

  7. Error creating bean with name 'dataSource' defined in class path resource [spring/spring-dao.xml]:

    Error creating bean with name 'dataSource' defined in class path resource [spring/spring-dao.xml]: B ...

  8. 解决Error creating bean with name ‘redisConnectionFactory‘ defined in class path resource...问题

    文章目录 1. 复现问题 2. 分析问题 3. 解决问题 1. 复现问题 今天在启动spring boot项目时,出现如下错误: org.springframework.beans.factory.B ...

  9. Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource [applicationContext

    学习spring框架时遇到一个问题,找了很久. 记录一个错误, D:\Java\jdk-14.0.2\bin\java.exe -ea -Didea.test.cyclic.buffer.size=1 ...

最新文章

  1. .net 面试题系列文章三(附答案)
  2. python构造一个二叉树_如何用python构造一个n层的完全二叉树
  3. inspinia前端模板怎样编写消息提示框点击确定后的回调方法
  4. 【机器学习】使用MLflow管理机器学习模型版本
  5. 修改vant 弹窗Dialog组件调用是确认按钮与取消按钮的文字
  6. html 小于号 乱码,shell重定向(大于号,小于号,左右,21,)
  7. python闹钟_用python做了个高级闹钟 欢迎借鉴
  8. selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element
  9. windows 快捷调用
  10. 【旅行商问题】基于matlab免疫算法求解旅行商问题【含Matlab源码 195期】
  11. php 获取客户端IP
  12. PalmOS开发教程
  13. PlantUML(程序员绘制流程图专用工具)
  14. 系统定时任务与延时任务
  15. Games101计算机图形学学习笔记:线性代数-向量
  16. 【天祺围棋】围棋分段位【打谱】【猜局】提高法
  17. 解决macbook pro中使用word打字出现拼音问题
  18. 【181029】FreeEIM 飞鸽传书仿QQ即时通讯软件VC++源代码
  19. html5仿蚂蚁森林效果代码,vue仿支付宝蚂蚁森林水滴
  20. 音画俱佳又好玩,感恩节入手这一台4K超高清电视机吧

热门文章

  1. Java入门篇——安装Java SE14
  2. 美国人初学Python100个代码题目之2
  3. 北交计算机学院推荐理由,北京交通大学计算机与信息技术学院赵守国老师介绍...
  4. java点到直线距离_求取点到直线的距离
  5. 艾宾浩斯记忆曲线(遗忘曲线)
  6. python爬虫笔记一:爬取豆瓣中指定的明星所有图片
  7. ## 弱鸡的第二次线上赛总结(TKK18no.4)
  8. 网上跨行转账将实时生效 第三方支付前景渺茫
  9. java基于springboot房产备案管理系统
  10. 计算机开始菜单打不开是什么原因,电脑开始菜单打不开怎么办_win7开始菜单点击无效解决方法...