问题描述
- jersey结果转json时候过滤属性
-
@GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public Response findBannerManage() { ReturnObj returnObj; List<BannerManage> list; try { list = bannerManageDao.getBannerManage(type, channelId_DGB); returnObj = new ReturnObj("200", "请求成功", list); return Response.ok(returnObj).build(); } catch (Exception e) { e.printStackTrace(); logger.error("findBannerManage method request exception ", e); returnObj = new ReturnObj("500", "服务器异常内部错误,意外终止响应"); return Response.accepted(returnObj).build(); } }
时间: 2024-09-11 10:02:46