Skip to content

Commit 68e5522

Browse files
lexburnerchickenlj
authored andcommitted
Merge pull request #3862, bugfix/remove-parse-error-log, revert #3823.
1 parent b48a045 commit 68e5522

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboBeanDefinitionParser.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,16 @@ private static BeanDefinition parse(Element element, ParserContext parserContext
136136
String beanProperty = name.substring(3, 4).toLowerCase() + name.substring(4);
137137
String property = StringUtils.camelToSplitName(beanProperty, "-");
138138
props.add(property);
139+
// check the setter/getter whether match
139140
Method getter = null;
140141
try {
141142
getter = beanClass.getMethod("get" + name.substring(3), new Class<?>[0]);
142143
} catch (NoSuchMethodException e) {
143144
try {
144145
getter = beanClass.getMethod("is" + name.substring(3), new Class<?>[0]);
145146
} catch (NoSuchMethodException e2) {
146-
logger.error("Method " + name + " parse error, cause: " + e2.getMessage(), e2);
147+
// ignore, there is no need any log here since some class implement the interface: EnvironmentAware,
148+
// ApplicationAware, etc. They only have setter method, otherwise will cause the error log during application start up.
147149
}
148150
}
149151
if (getter == null

0 commit comments

Comments
 (0)