一:编译器报错

这个地方是由于没有被spring管理,编译器报错,可以选择加上@comoponent这个注解

也可以选择不加,启动程序是不会报错的.

二 报错为空:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'personService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.cxy.service.IPersonService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: PathVariable annotation was empty on param .
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$(AbstractBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:) ~[spring-context-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:) ~[spring-context-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:) ~[spring-boot-2.1..RELEASE.jar:2.1..RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:) [spring-boot-2.1..RELEASE.jar:2.1..RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:) [spring-boot-2.1..RELEASE.jar:2.1..RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:) [spring-boot-2.1..RELEASE.jar:2.1..RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:) [spring-boot-2.1..RELEASE.jar:2.1..RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:) [spring-boot-2.1..RELEASE.jar:2.1..RELEASE]
at com.cxy.UserApplication.main(UserApplication.java:) [classes/:na]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.cxy.service.IPersonService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: PathVariable annotation was empty on param .
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
... common frames omitted
Caused by: java.lang.IllegalStateException: PathVariable annotation was empty on param .
at feign.Util.checkState(Util.java:) ~[feign-core-10.1..jar:na]
at org.springframework.cloud.openfeign.annotation.PathVariableParameterProcessor.processArgument(PathVariableParameterProcessor.java:) ~[spring-cloud-openfeign-core-2.1..RELEASE.jar:2.1..RELEASE]
at org.springframework.cloud.openfeign.support.SpringMvcContract.processAnnotationsOnParameter(SpringMvcContract.java:) ~[spring-cloud-openfeign-core-2.1..RELEASE.jar:2.1..RELEASE]
at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:) ~[feign-core-10.1..jar:na]
at org.springframework.cloud.openfeign.support.SpringMvcContract.parseAndValidateMetadata(SpringMvcContract.java:) ~[spring-cloud-openfeign-core-2.1..RELEASE.jar:2.1..RELEASE]
at feign.Contract$BaseContract.parseAndValidatateMetadata(Contract.java:) ~[feign-core-10.1..jar:na]
at feign.ReflectiveFeign$ParseHandlersByName.apply(ReflectiveFeign.java:) ~[feign-core-10.1..jar:na]
at feign.ReflectiveFeign.newInstance(ReflectiveFeign.java:) ~[feign-core-10.1..jar:na]
at feign.Feign$Builder.target(Feign.java:) ~[feign-core-10.1..jar:na]
at org.springframework.cloud.openfeign.HystrixTargeter.target(HystrixTargeter.java:) ~[spring-cloud-openfeign-core-2.1..RELEASE.jar:2.1..RELEASE]
at org.springframework.cloud.openfeign.FeignClientFactoryBean.loadBalance(FeignClientFactoryBean.java:) ~[spring-cloud-openfeign-core-2.1..RELEASE.jar:2.1..RELEASE]
at org.springframework.cloud.openfeign.FeignClientFactoryBean.getTarget(FeignClientFactoryBean.java:) ~[spring-cloud-openfeign-core-2.1..RELEASE.jar:2.1..RELEASE]
at org.springframework.cloud.openfeign.FeignClientFactoryBean.getObject(FeignClientFactoryBean.java:) ~[spring-cloud-openfeign-core-2.1..RELEASE.jar:2.1..RELEASE]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:) ~[spring-beans-5.1..RELEASE.jar:5.1..RELEASE]
... common frames omitted Process finished with exit code

这个主要看最后一个是参数不存在的错误

说明问题:

问题解决方法

整合feign过程中出现问题:的更多相关文章

  1. SSM整合搭建过程中的一个怪异问题

    好久没有搭建框架了,昨天开始试图搭建一个SSM框架,各种配置文件搭建成功,服务器也启动正确,但是在运行过程中,发现总是不能获取JDBC,不能够创建连接池工厂,报错如下:网页报500错误码 SEVERE ...

  2. Spring3+hibernate4+struts2整合的 过程中发生如下错误

    严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis ...

  3. hibernate4.3.8整合struts2过程中遇到的问题

    1.遇到的异常: Exception in thread "main" org.hibernate.service.spi.ServiceException: Unable to ...

  4. springMVC+spring+mybatis整合过程中遇到的问题

    今天在配置SSM整合的过程中遇到了几个错误,折腾了好久,具体如下 1.java.lang.IllegalArgumentException: Mapped Statements collection ...

  5. MySQL Fabric和MyBatis的整合过程中遇到的问题

    这是我昨天在整合MySQL Fabric和MyBatis时遇到的问题,花了大半天才解决的问题,解决的过程中在网上查找了很久,都没有找到解决的方案.现在记下来,希望能够帮助有同样问题的朋友.如果各位朋友 ...

  6. hibernate4整合spring3.1的过程中的异常问题

    (1)hibernate4整合spring3.1的过程中,发现了java.lang.NoClassDefFoundError: Lorg/hibernate/cache/CacheProvider异常 ...

  7. SpringCloud整合过程中jar依赖踩坑经验

    今天在搭建SpringCloud Eureka过程中,一直在报pom依赖错误,排查问题总结如下经验. 1.SpringBoot整合SpringCloud两者版本是有严格约束的,详细见SpringBoo ...

  8. Spring4 与 Hibernate4 整合过程中的问题记录

    Spring4使用注解配置,很方便也很有趣,就是有一些坑需要自己去发现和解决,笔者列出自己在使用过程中遇到的问题,希望对您有所帮助. 1.如果使用hibernate.cfg.xml配置文件配置Hibe ...

  9. Spring Cloud Alibaba Sentinel 整合 Feign 的设计实现

    作者 | Spring Cloud Alibaba 高级开发工程师洛夜 来自公众号阿里巴巴中间件投稿 前段时间 Hystrix 宣布不再维护之后(Hystrix 停止开发...Spring Cloud ...

随机推荐

  1. How to clear fmadm log or FMA faults log (ZT)

    Here are the step by step of clearing the FMA faults on most of Oracle/Sun server. Work perfectly on ...

  2. 12-01Js对象##正则表达式##

    正则表达式:是一个字符一个字符的验证,通过量词验证字符串: 1.什么是RegExp?RegExp是正则表达式的缩写.RegExp 对象用于规定在文本中检索的内容. 2.定义RegExp:var +变量 ...

  3. 问题:sqlserver有没有类似Oracle的LISTAGG;结果: 灵活运用 SQL SERVER FOR XML PATH

    灵活运用 SQL SERVER FOR XML PATH FOR XML PATH 有的人可能知道有的人可能不知道,其实它就是将查询结果集以XML形式展现,有了它我们可以简化我们的查询语句实现一些以前 ...

  4. spring-boot 热加载实现替换Jrebel

    导读: 本文主要说说,在玩spring-boot时,我们经常要遇到重启服务这种浪费时间的事情,为了割掉这个痛点,我们一般有2中方式实现. 一个是springload , 另外一个是 spring-bo ...

  5. Angular问题02 创建模块失败、 angular-cli名称问题、升级angular-cli

    1 创建模块失败 1.1 问题描述 利用 ng g m 模块名 创建新模块时出错 1.2 错误信息 1.3 问题原因 angular-cli 版本出现问题 1.4 解决办法 卸载掉之前使用的 angu ...

  6. eclipse中安装git插件

    1 安装及配置git插件,问度娘即可 点击前往 2 eclipse 中怎么同步到 本地git仓库 和 码云远程仓库 点击前往

  7. easyui layout 折叠之后显示标题

    方法一:重载扩展panel收缩事件 (function($){ var buttonDir = {north:'down',south:'up',east:'left',west:'right'}; ...

  8. linux sdcv命令

    一.简介 sdcv全称为stardict console version,是终端下的词典.   二.安装 1)安装sdcv yum install -y sdcv 2)安装字典 http://www. ...

  9. Android 中的菜单 OptionsMenu的简单应用

    OptionsMenu就是安卓手机中的菜单选项 首先 要实现对菜单的操作就要先重写OnCreateOptionsMenu(Menu menu)方法 通常有两种方法来实现对菜单中选项的添加 第一种是动态 ...

  10. HttpServletResponse和HttpServletRequest详解.RP

    HttpServletResponse,HttpServletRequest详解 1.相关的接口   HttpServletRequest HttpServletRequest接口最常用的方法就是获得 ...