启动项目报错:org.springframework.beans.factory.UnsatisfiedDependencyException
dubbo项目:
启动项目报错:(web端)
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.refile.api.service.UserService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
原因:
一直以为是dubbo端服务没有正常提供接口服务,但发现报错的内容和找不到dubbo接口服务异常内容不一样,所以怀疑不是dubbo提供接口服务问题。
找了半天发现是web端启动的时候没有扫描到dubbo消费端的配置文件。
解决办法:
修改web.xml文件的内容:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/refile-mvc.xml</param-value>
</context-param>
改为classpath:spring/*.xml
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/*.xml</param-value>
</context-param>
spring监听器:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/refile-mvc.xml</param-value>
</context-param>
启动项目报错:org.springframework.beans.factory.UnsatisfiedDependencyException的更多相关文章
- SSM整合报错org.springframework.beans.factory.UnsatisfiedDependencyException
我解决的办法是把.m2仓库所有文件删除,重新maven project就可以了. 但是在做这一步之前,报错如下: ①org.springframework.beans.factory.Unsatisf ...
- 【spring boot】使用注解@ConfigurationProperties读取配置文件时候 报错 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rocketmqAutoConfiguration': Unsatisfied dependenc
如题,配置文件如下: #注册中心配置 eureka: instance: instanceId: ${spring.application.name}:${random.int} hostname: ...
- Tomcat 启动时项目报错 org.springframework.beans.factory.BeanCreationException
事情是这样的,最近我们公司需要将开发环境和测试环境分开,所以就需要把所有的项目部署一套新的开发环境. 我们都是通过 Jenkins 进行部署的,先说一下两个环境的配置: 测试环境配置(旧):jdk1. ...
- java项目报错: org.springframework.beans.factory.BeanCreationException找不到mapper.xml文件
错误代码 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userSer ...
- tomcat启动报错:org.springframework.beans.factory.BeanCreationException
Web容器在启动时加载 spring 配置文件时解析xml失败常常引起容器启动失败.这次配置文件是 ibatis的sql脚本出了问题: Context initialization failed or ...
- springboot 报错 org.springframework.beans.factory.NoSuchBeanDefinitionException:No qualifying bean of type 'com.example.service.HrService' available: 有没有大佬出个主意,我找了一天,刚入门springboot
话不多说先上图,这是启动类的配置,这里配置了@ComponentScan("我的mapper的接口") 接下来是我的项目结构截图 然后是service 的截图,我在这里加了注解@S ...
- 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 ...
- 报错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 ...
- spring装载配置文件失败报错:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
Tomcat容器启动失败,找到 debug日志一看: Context initialization failed org.springframework. beans.factory.xml.XmlB ...
- 报错org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybatis.spring.SqlSessionFactoryBean]
超级大坑 org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybati ...
随机推荐
- WebRTC开源项目一览之二
.Kurento视频直播系统4.1 应用实例搞视频会议就会涉及一对多.多对多.广播.转码.混音.合屏.录制,这就需要用到流媒体服务器,而kurento就具有这些功能.他主要用来作为webrtc的流媒 ...
- 观光奶牛Sightseeing Cows (二分+spfa(dfs))
观光奶牛 农夫约翰已决定通过带他们参观大城市来奖励他们的辛苦工作!奶牛必须决定如何最好地度过他们的空闲时间. 幸运的是,他们有一个详细的城市地图,显示L(2≤L≤1000)主要地标(方便编号为1 .. ...
- 将maven项目中依赖的jar包导出到指定的目录
<plugin> <artifactId>maven-dependency-plugin</artifactId> <configuration> &l ...
- 关于数据未渲染完,要获取document高度问题——ajax全局事件
昨天在做开发时,遇到这样一个问题,当页面刚加载的时候,就要获取document的高度,可是此时页面上所有的ajax请求的数据都还没有渲染到页面上,所以导致得到的document的高度仅仅是页面结构的高 ...
- vue 父子组件通信props/emit
props 1.父组件传递数据给子组件 父组件: <parent> <child :childMsg="msg"></child>//这里必须要 ...
- mysql5.5碰到的type= MyISAM报错问题
最近把mysql升级到5.5版本,发现type= MyISAM报错,网上查了一下原来MYSQL5.5.x 版本 不支持 TYPE=MyISAM 这样的语句了!!! MYSQL语句写法 TYPE=My ...
- 一个helloword hibernate配置以及查询
搭建一个Hibernate环境,开发步骤: 1. 下载源码 版本:hibernate-distribution-3.6.0.Final 2. 引入jar文件 hibernate3.jar核心 + ...
- 【Django】创建后的基本操作
1.创建Django项目做基本的配置步骤Pycharm->new->New Project 2.基本的配置settings.py-->STATIC_URL = '/static/'后 ...
- 粘包解决高端_Server
from socket import * #导入套接字模块的所有命令import subprocess #导入subprocess模块,用于执行命令行import struct #导入struck模块 ...
- css——样式的继承
css的样式继承 在上面这段代码中,p{}为父类,b{}为子类.b{}将继承p{}. 因为<b>在<p>里面,p{}为父类,b{}为子类. 继承方式: 如果子类没有,父类有,则 ...