Caused by: java.lang.IllegalStateException: Method findAllListByMember can only contain 1 method fie

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.xx.remoteapi.SysPermissionRemoteService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Method findAllListByMember can only contain 1 method field. Found: [POST, GET]
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1634)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1316)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1282)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1101)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
	... 19 common frames omitted
Caused by: java.lang.IllegalStateException: Method findAllListByMember can only contain 1 method field. Found: [POST, GET]
	at feign.Util.checkState(Util.java:128)
	at org.springframework.cloud.netflix.feign.support.SpringMvcContract.checkOne(SpringMvcContract.java:216)
	at org.springframework.cloud.netflix.feign.support.SpringMvcContract.processAnnotationOnMethod(SpringMvcContract.java:169)
	at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:95)
	at org.springframework.cloud.netflix.feign.support.SpringMvcContract.parseAndValidateMetadata(SpringMvcContract.java:133)
	at feign.Contract$BaseContract.parseAndValidatateMetadata(Contract.java:64)
	at feign.hystrix.HystrixDelegatingContract.parseAndValidatateMetadata(HystrixDelegatingContract.java:34)
	at feign.ReflectiveFeign$ParseHandlersByName.apply(ReflectiveFeign.java:146)
	at feign.ReflectiveFeign.newInstance(ReflectiveFeign.java:53)
	at feign.Feign$Builder.target(Feign.java:218)
	at org.springframework.cloud.netflix.feign.HystrixTargeter.target(HystrixTargeter.java:56)
	at org.springframework.cloud.netflix.feign.FeignClientFactoryBean.loadBalance(FeignClientFactoryBean.java:145)
	at org.springframework.cloud.netflix.feign.FeignClientFactoryBean.getObject(FeignClientFactoryBean.java:166)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
	... 29 common frames omitted
Disconnected from the target VM, address: '127.0.0.1:57409', transport: 'socket'

原因是定义feign客户客户端的时候,注解@RequestMapping上面的只支持单个(如: 
method = RequestMethod.POST
或者
method = RequestMethod.GET
等,定义成
method = {RequestMethod.POST,RequestMethod=GET}是错误的
 
  

你可能感兴趣的:(java)