code: @SuppressWarnings({ "rawtypes", "unchecked" })
  	private void beanToMap(Object bean, Map targetMap) {
  		final Collection<PropDesc> props = BeanUtil.getBeanDesc(bean.getClass()).getProps();
  		final HashSet<String> ignoreSet = (null != copyOptions.ignoreProperties) ? CollUtil.newHashSet(copyOptions.ignoreProperties) : null;
  		final CopyOptions copyOptions = this.copyOptions;
  
  		String key;
  		Method getter;
  		Object value;
  		for (PropDesc prop : props) {
  			key = prop.getFieldName();
  			// 过滤class属性
  			// 得到property对应的getter方法
  			getter = prop.getGetter();
  			if (null != getter) {
  				// 只读取有getter方法的属性
  				try {
  					value = getter.invoke(bean);
  				} catch (Exception e) {
  					if (copyOptions.ignoreError) {
  						continue;// 忽略反射失败
  					} else {
  						throw new UtilException(e, "Get value of [{}] error!", prop.getFieldName());
  					}
  				}
  				if (CollUtil.contains(ignoreSet, key)) {
  					// 目标属性值被忽略或值提供者无此key时跳过
  					continue;
  				}
  				if (null == value && copyOptions.ignoreNullValue) {
  					continue;// 当允许跳过空时，跳过
  				}
  				if (bean.equals(value)) {
  					continue;// 值不能为bean本身，防止循环引用
  				}
  				targetMap.put(mappingKey(copyOptions.fieldMapping, key), value);
  			}
  		}
  	}
docs: 对象转Map
  
  @param bean bean对象
  @param targetMap 目标的Map
  @return Map
  @since 4.1.22