map接收参数后转成json,在转换为对象/ map取值后直接转为对象

 

 

 

<dependency>
    <groupId>commons-beanutils</groupId>
    <artifactId>commons-beanutils</artifactId>
    <version>1.9.3</version>
</dependency>
Map Mlist = redisUtil.hashGetAllCommon(jqbh);
            try {
                PropertyUtils.copyProperties(jqztxxcx,Mlist );
            } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
                e.printStackTrace();
            }

 

 

后续:map取值后直接转对象


List<TJqZdshjHdzt> list = JSONArray.parseArray(params.get("hdsetting").toString(),
TJqZdshjHdzt.class);

 

posted @ 2018-04-13 10:01  彈指一揮間  阅读(501)  评论(0编辑  收藏  举报