package com.miaxis.feign.utils;

import com.fasterxml.jackson.databind.ObjectMapper;

public class FeignUtils {

    /**
     * @Description: 将数据转换到相应的容器
     * @return
     * @throws
     */
    public static <T> T convertValue(Object bean, Class<T> clazz){
        try{
            ObjectMapper mapper = new ObjectMapper();
            return mapper.convertValue(bean, clazz);
        }catch(Exception e){
            e.printStackTrace();
            return null;
        }
    }

}
