feign异常ConfigurationPropertiesRebinderAutoConfiguration$BeanPostProcessorChecker not eligible for getting processed by all BeanPostProcessors
之前feign使用都是正常的,即使报错也能很快定位到问题,最近工作居然报了这个错误,首先找到ConfigurationPropertiesRebinderAutoConfiguration类,然后找到内部类BeanPostProcessorChecker ,这个只是一个日志并没有抛出错误,刚开始没留意,后面跟源码发现这里只是一个启发点,于是debug这里,一直跟代码,后面报错是服务找不到,为什么这种错误没抛出来,之前的人写了日志封装,错误日志给吞了,另外给我服务名的人给的小写,eureka上是大写的,改好就好了
org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor
private static final class BeanPostProcessorChecker implements BeanPostProcessor {
		private static final Log logger = LogFactory.getLog(BeanPostProcessorChecker.class);
		private final ConfigurableListableBeanFactory beanFactory;
		private final int beanPostProcessorTargetCount;
		public BeanPostProcessorChecker(ConfigurableListableBeanFactory beanFactory, int beanPostProcessorTargetCount) {
			this.beanFactory = beanFactory;
			this.beanPostProcessorTargetCount = beanPostProcessorTargetCount;
		}
		@Override
		public Object postProcessBeforeInitialization(Object bean, String beanName) {
			return bean;
		}
		@Override
		public Object postProcessAfterInitialization(Object bean, String beanName) {
			if (!(bean instanceof BeanPostProcessor) && !isInfrastructureBean(beanName) &&
					this.beanFactory.getBeanPostProcessorCount() < this.beanPostProcessorTargetCount) {
				if (logger.isInfoEnabled()) {
					logger.info("Bean '" + beanName + "' of type [" + bean.getClass().getName() +
							"] is not eligible for getting processed by all BeanPostProcessors " +
							"(for example: not eligible for auto-proxying)");
				}
			}
			return bean;
		}
上面只是我遇到问题解决的切入点,后面跟的代码报错找不到位置了,大家遇到类似问题跟代码就好,我这里把FeignClient对应的服务名写正确问题就解决了
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号