From 9f4c8555897110a8db5337097fa85a6ed7acbe06 Mon Sep 17 00:00:00 2001 From: xujingfeng Date: Fri, 12 Apr 2019 11:12:03 +0800 Subject: [PATCH] bugfix/remove-parse-error-log --- .../dubbo/config/spring/schema/DubboBeanDefinitionParser.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboBeanDefinitionParser.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboBeanDefinitionParser.java index 3c69294b5d0..f5c2ab07f93 100644 --- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboBeanDefinitionParser.java +++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboBeanDefinitionParser.java @@ -136,6 +136,7 @@ private static BeanDefinition parse(Element element, ParserContext parserContext String beanProperty = name.substring(3, 4).toLowerCase() + name.substring(4); String property = StringUtils.camelToSplitName(beanProperty, "-"); props.add(property); + // check the setter/getter whether match Method getter = null; try { getter = beanClass.getMethod("get" + name.substring(3), new Class[0]); @@ -143,7 +144,8 @@ private static BeanDefinition parse(Element element, ParserContext parserContext try { getter = beanClass.getMethod("is" + name.substring(3), new Class[0]); } catch (NoSuchMethodException e2) { - logger.error("Method " + name + " parse error, cause: " + e2.getMessage(), e2); + // ignore, there is no need any log here since some class implement the interface: EnvironmentAware, + // ApplicationAware, etc. They only have setter method, otherwise will cause the error log during application start up. } } if (getter == null