diff --git a/openmessaging/src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java b/openmessaging/src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java index ba7cd5973aae568bf549fdfa1ce954a139bdcf47..054374b8f9b8a5e1ee9837b40848f80ef3a31c12 100644 --- a/openmessaging/src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java +++ b/openmessaging/src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java @@ -164,14 +164,14 @@ public final class BeanUtils { final Set keySet = properties.keySet(); for (String key : keySet) { - String[] keyGroup = key.split("\\."); + String[] keyGroup = key.split("[\\._]"); for (int i = 0; i < keyGroup.length; i++) { keyGroup[i] = keyGroup[i].toLowerCase(); keyGroup[i] = StringUtils.capitalize(keyGroup[i]); } String beanFieldNameWithCapitalization = StringUtils.join(keyGroup); try { - setProperties(clazz, obj, "set" + beanFieldNameWithCapitalization, properties.getString(key)); + setProperties(clazz, obj, "setOms" + beanFieldNameWithCapitalization, properties.getString(key)); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ignored) { //ignored... }