【问题标题】:Using jersey, is it possible to hide certain class properties?使用球衣,是否可以隐藏某些类属性?
【发布时间】:2012-09-01 12:09:05
【问题描述】:

假设我有一个用户类,它有一个密码属性。

当我使用 jersey 在 restful api 调用中公开此类时,是否有可能以某种方式标记“密码”属性使其不被公开(转换为 json 或 xml)?

【问题讨论】:

    标签: java json jersey jackson


    【解决方案1】:

    你试过了吗?

     @XmlTransient
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-14
      相关资源
      最近更新 更多