public void invokeAfterPropertiesSet() throws Exception { feign.codec.Decoder feignDecoder = null; String[] beanNameArray = this.applicationContext.getBeanNamesForType(feign.codec.Decoder.class); for (int i = 0; beanNameArray != null && i < beanNameArray.length; i++) { String beanName = beanNameArray[i]; Object beanInst = this.applicationContext.getBean(beanName); if (CompensableFeignDecoder.class.isInstance(beanInst)) { continue; } else if (feignDecoder != null) { throw new RuntimeException("There are more than one feign.codec.Decoder exists!"); } else { feignDecoder = (feign.codec.Decoder) beanInst; } } if (feignDecoder == null) { feignDecoder = new ResponseEntityDecoder(new SpringDecoder(this.objectFactory)); } // end-if (feignDecoder == null) this.delegate = feignDecoder; }
@org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean(feign.codec.Decoder.class) @org.springframework.context.annotation.Bean public feign.codec.Decoder feignDecoder(@Autowired ObjectFactory<HttpMessageConverters> messageConverters) { return new ResponseEntityDecoder(new SpringDecoder(messageConverters)); }
@Bean @ConditionalOnMissingBean public Decoder feignDecoder() { return new OptionalDecoder(new ResponseEntityDecoder(new SpringDecoder(this.messageConverters))); }
@Bean @ConditionalOnMissingBean public Decoder feignDecoder() { return new OptionalDecoder(new ResponseEntityDecoder(new SpringDecoder(this.messageConverters))); }
public void invokeAfterPropertiesSet() throws Exception { feign.codec.Decoder feignDecoder = null; String[] beanNameArray = this.applicationContext.getBeanNamesForType(feign.codec.Decoder.class); for (int i = 0; beanNameArray != null && i < beanNameArray.length; i++) { String beanName = beanNameArray[i]; Object beanInst = this.applicationContext.getBean(beanName); if (TransactionFeignDecoder.class.isInstance(beanInst)) { continue; } else if (feignDecoder != null) { throw new RuntimeException("There are more than one feign.codec.Decoder exists!"); } else { feignDecoder = (feign.codec.Decoder) beanInst; } } if (feignDecoder == null) { feignDecoder = new ResponseEntityDecoder(new SpringDecoder(this.objectFactory)); } // end-if (feignDecoder == null) this.delegate = feignDecoder; }