Skip to content

Commit

Permalink
update spring boot bean cache utils.
Browse files Browse the repository at this point in the history
  • Loading branch information
vnobo committed Feb 19, 2024
1 parent 32db49e commit 1ab7532
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ public static <T> Map<String, Object> beanToMap(T bean, final boolean ignoreNull
return BeanUtils.beanToMap(bean, false, ignoreNullValue);
}

/**
* 将对象转换为Map对象
*
* @param bean 要转换的对象
* @param isToUnderlineCase 是否转换为下划线命名方式
* @param ignoreNullValue 是否忽略空值
* @return 转换后的Map对象
*/
public static <T> Map<String, Object> beanToMap(T bean,
final boolean isToUnderlineCase,
final boolean ignoreNullValue) {
Expand All @@ -138,6 +146,7 @@ public static <T> Map<String, Object> beanToMap(T bean,
return objectMapper.convertValue(bean, type);
}


@Override
public void afterPropertiesSet() {
}
Expand Down

0 comments on commit 1ab7532

Please sign in to comment.