首页>代码>SpringBoot+Mybatis+thymeleaf搭建开源个人博客系统>/blog/src/main/java/springboot/client/codec/HttpJsonResponseDecoder.java
package springboot.client.codec;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.FullHttpResponse;
import springboot.server.codec.AbstractHttpJsonDecoder;
import springboot.server.codec.HttpJsonResponse;

import java.util.List;

/**
 * @author tangj
 * @date 2018/4/15 21:48
 */
public class HttpJsonResponseDecoder extends AbstractHttpJsonDecoder<FullHttpResponse> {

    public HttpJsonResponseDecoder(Class<?> clazz) {
        super(clazz);
    }

    public HttpJsonResponseDecoder(Class<?> clazz, boolean isPrint) {
        super(clazz, false);
    }

    @Override
    protected void decode(ChannelHandlerContext ctx, FullHttpResponse msg, List<Object> out) throws Exception {
        out.add(new HttpJsonResponse(msg,jsonDecode(ctx,msg.content())));
    }
}
最近下载更多
ghjgjhgjh  LV1 6月17日
zhouenyi  LV6 3月20日
酒酒清欢  LV8 2023年12月5日
微信网友_6724618780348416  LV3 2023年12月4日
yqyqyqyqy  LV4 2023年7月23日
3416059514  LV1 2023年6月23日
try8023  LV19 2023年5月4日
ycyycy  LV1 2022年10月24日
zxc131313  LV12 2022年10月22日
最近浏览更多
Peny_ZH  LV5 9月21日
xiaoxindu8  LV9 9月13日
yellow_flowers  LV8 7月8日
tt867309  LV1 7月7日
李朝磊  LV18 6月28日
ghjgjhgjh  LV1 6月17日
lllajen 6月9日
暂无贡献等级
暂无贡献等级
ccccchhhh 5月31日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友