Error starting Tomcat context. 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.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthIndicatorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthIndicatorAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthIndicatorRegistry]: Factory method 'healthIndicatorRegistry' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '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

这是什么原因造成的呢?

我自己摸索了很久发现,该项目的在pom文件中的这个看图:

没错,packaging标签我们不应该写成pom,要嘛不写去掉,要嘛就写成jar。

然后重启springBoot项目就不会报这个错误了,希望能帮到大家。

Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException的更多相关文章

  1. 异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.ContextLoaderListener] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class p

    严重: 异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.ContextLoaderListener]org.springframework ...

  2. Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException:

    严重: Exception sending context initialized event to listener instance of class org.springframework.we ...

  3. ssh整合报错严重: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxx'

    错误描述:eclipse整合ssh的时候 报不能创建名字为xxx的对象 信息: Destroying singletons in org.springframework.beans.factory.s ...

  4. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [bean.xml]: Invocation of init method failed; nested exception is

    在复制xml文件进行修改的时候,我经常将不小心对原文件进行修改,而导致创建bean出错.报错如下所示: Exception sending context initialized event to l ...

  5. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'

    七月 05, 2018 10:26:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRul ...

  6. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource

    二月 20, 2017 3:09:47 下午 org.apache.catalina.startup.SetAllPropertiesRule begin警告: [SetAllPropertiesRu ...

  7. 开发Spring过程中几个常见异常(二):Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'a' define

    本异常是小编在运行自己另外一篇博文中的例子时遇到的.(附博文:http://www.cnblogs.com/dudududu/p/8482487.html) 完整异常信息: 警告: Exception ...

  8. 【flyway】Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' def

    报错如下: "2018-03-20 12:58:09.585 WARN 18026 — [ restartedMain] ConfigServletWebServerApplicationC ...

  9. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stu' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stu' defined ...

随机推荐

  1. Galaxy2D游戏引擎常见问题解答

    ◆Galaxy2D游戏引擎开源吗?    Galaxy2D游戏引擎不开源. ◆Galaxy2D相对HGE有何优点?    Galaxy2D相对HGE有以下优点:     (1)自带音频播放功能,HGE ...

  2. python网络爬虫学习笔记(二)BeautifulSoup库

    Beautiful Soup库也称为beautiful4库.bs4库,它可用于解析HTML/XML,并将所有文件.字符串转换为'utf-8'编码.HTML/XML文档是与“标签树一一对应的.具体地说, ...

  3. Intellij IDEA超好用的快捷键

    1.首推 Ctrl+Shift+Enter,自动跳出括号,在行尾添加分号,并自动回车. 2.Ctrl+Shift+J,将多行代码折叠成一行. 当你遇到的时候,这个快捷键非常实用.比如你在写painle ...

  4. docker开启远程访问

    作者:zqifa 出处:http://www.cnblogs.com/zqifa/ 默认情况下,Docker守护进程Unix socket(/var/run/docker.sock)来进行本地进程通信 ...

  5. winform datagridview 导出excel

    using System;using System.Collections.Generic;using System.Text;using System.IO;using Microsoft.Offi ...

  6. java中几种常用的设计模式

    参考https://blog.csdn.net/jiyang_1/article/details/50110931 参考https://blog.csdn.net/dean_hu/article/de ...

  7. Spring 回滚事务@Transactional

    @Transactional   spring 事务注解 默认遇到throw new RuntimeException("...");会回滚 需要捕获的throw new Exce ...

  8. wechat-plus 使用node开发微信公众号

    github:https://github.com/liuyinglong/node-wechatnpm:https://www.npmjs.com/package/wechat-plus insta ...

  9. 关于Float.parseFloat()的一点探讨

    最近在解决线上的bug时,遇到一个问题. 第三方传过来的课程编码时4214410000,然而我们存进数据库的值却变成了4214409980.查遍了所有的代码都查不到有对这个值修改的代码.最后,通过打印 ...

  10. 由2个鸡蛋从100层楼下落到HashMap的算法优化联想

    题目: 有一栋楼共100层,一个鸡蛋从第N层及以上的楼层下落会摔破,在第N层以下的楼层不会摔破,给你两个鸡蛋,设计方案找出N,并且保证在最坏的情况下,最小化鸡蛋下落的次数.(鸡蛋没有摔破是可以重复利用 ...