在练习中遇到的,我的情况是:

  • 打算在common中建立student实体类,想到可能其他模块也会用到这个类,但是一些注解比如,@TableId等等需要用到mybatis-plus的依赖,所以我就把依赖包放到common中了。
  • 提供者启动正常,但是消费者启动时候报错(就是标题的错误)。
  • 经过排查发现添加那个依赖后需要配置dataSource信息,但是我消费者中又不需要访问数据库。

最后将common中的mp依赖和Student实体类老老实实放回提供者中了。

添加common依赖之后发现了那些依赖很容易就套乱了,idea又容易发神经,有时候命名可以点进去,但是就是运行报错,有时候甚至出现clean后构建编译不出class文件的情况,就只是将yml文件整到target中了。

如果这种需要配置dataSource错误和网关中不允许引入starter web依赖还好会直接报错给你,有的错误就是一个bean抛异常,一个什么什么摧毁了,找问题所在找得头都要裂了。之后一定要好好看看引入的依赖,跟模块中所需求的,尤其公共类与父类中的依赖和版本。

BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource的更多相关文章

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

    在学习spring整合hubernate时遇到的问题.c3p0遇到了一个问题,老连不上,显示java.lang.NoClassDefFoundError:com.mchange.v2.ser.Indi ...

  2. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [spring/applicationContext-service.xml]: Cannot resolve refer

    <!-- aop --> <aop:config> <aop:pointcut expression="execution(* com.zsn.Service. ...

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

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'r ...

  4. 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 ...

  5. aused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method fai

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

  6. Spring AOP 报错org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'XXXXXX' defined in class path resource..........

    完整报错如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'befo ...

  7. 报错org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [bean.xml]

    报这种错的原因基本上是applicationContext.xml文件中bean配置错误,错误如下: org.springframework.beans.factory.BeanCreationExc ...

  8. 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 ...

  9. 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 ...

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

    spring boot web项目运行时提示如下错误 org.springframework.beans.factory.BeanCreationException: Error creating b ...

随机推荐

  1. kali 安装

    准备 选用系统: kali-linux-2018.1-amd64.iso     kali-linux-2020.2-installer-amd64.iso 开始 2018版 1.选用图形化安装 2. ...

  2. 02如何直接使用uni-app中提供的模板之公告滚动

    用hBuibler将提供的模板下载下载,通过url上的路径找到你需要的模板对应的位置. 然后将这个文件夹中的diamante全部赋值过来就ok了. <view class="uni-p ...

  3. 从找朋友到找变位词:一道趣味字符串问题的深入解析|LeetCode 438 找到字符串中所有字母异位词

    LeetCode 438 找到字符串中所有字母异位词 点此看全部题解 LeetCode必刷100题:一份来自面试官的算法地图(题解持续更新中) 生活中的算法 还记得小时候玩的"找朋友&quo ...

  4. Linux systemd服务

    Linux systemd服务 systemctl命令 systemctl是systemd的主命令,用于管理系统和服务.以下是一些常用的systemctl命令: 查看服务状态:systemctl st ...

  5. [大模型/AI/GPT] Chatbox:大模型可视化终端应用

    序 概述:Chatbox AI Chatbox AI 是一款 AI 客户端应用和智能助手,支持众多先进的 AI 模型和 API,可在 Windows.MacOS.Android.iOS.Linux 和 ...

  6. 洛谷P2789 直线交点数 题解

    解题思路 考虑将直线分组,每组内直线互相平行,任意两组直线间交点数量等于两组内直线数量乘积. 分组操作使用dfs,求出交点数量后加入set去重,输出set大小. 时间复杂度O(2NN2)有点鬼畜但是可 ...

  7. [国家集训队] happiness 题解

    发现可以做如下建图: 对于前两组输入,从 \(s\) 向所有代表学生的点连一条边,容量为其学习文科的喜悦值:从所有代表学生的点向 \(t\) 连一条边,容量为其学习理科的最大值. 对于后四组输入,建两 ...

  8. Thymeleaf Split

    <th:block th:each="image : ${#strings.listSplit(goods.images, ';')}"> <img th:src ...

  9. 图片的 rgb信息 byte[] 直接转换为bmp文件

    方法1: /// <summary> /// rgb像素值转换为bmp文件 /// </summary> /// <param name="buffer&quo ...

  10. win11 - 设置FTP服务详细教程

    题记部分 一.开启FTP服务 https://blog.csdn.net/qq_42142258/article/details/131725760 二.配置FTP服务 https://blog.cs ...