zoukankan      html  css  js  c++  java
  • 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对应的服务名写正确问题就解决了

     
  • 相关阅读:
    Android视图控件架构分析之View、ViewGroup
    JAVA多线程编程——JAVA内存模型
    开源CMS系统Moodle对比中国本土化开源在线教育平台EduSoho
    Android系统Binder机制学习总结
    Android中一个关于ListView的奇怪问题
    判断分数区间(优良以及未及格)
    js求三个数的最大值运算
    年月日时间选择
    js单击时页面的弹出
    margin与padding
  • 原文地址:https://www.cnblogs.com/javashare/p/12527793.html
Copyright © 2011-2022 走看看