`
liyixing1
  • 浏览: 957185 次
  • 性别: Icon_minigender_1
  • 来自: 江西上饶
社区版块
存档分类
最新评论

Conflicting getter definitions for property异常

 
阅读更多
org.codehaus.jackson.map.JsonMappingException: Conflicting getter definitions for property "enabled": com.cgodo_component.model.UserLoginModel#isEnabled(0 params) vs com.cgodo_component.model.UserLoginModel#getEnabled(0 params)

错误信息大概如上,意思是
是我们的类中有个isEnabled,还有getEnabled两个方法,jackson无法确定唯一的getter函数。

可以再其中一个方法中使用
@JsonIgnore
public Enable getEnabled() {
return enabled;
}

@JsonIgnore注解,或者也可以使用其他注解,让json特殊处理。

http://linmingren.me/blog/2012/08/%E7%94%A8jackson%E5%BA%93%E6%9D%A5%E6%8A%8Ajava%E5%AF%B9%E8%B1%A1%E4%BF%9D%E5%AD%98%E4%B8%BAjson%E6%A0%BC%E5%BC%8F/
分享到:
评论

相关推荐

    MinGW -w64-for window 32bit or 64 bit

    MinGW -w64-for window 32bit or 64 bit MinGW -w64-for window 32bit or 64 bit MinGW -w64-for window 32bit or 64 bit MinGW -w64-for window 32bit or 64 bit

    Android 出现问题Installation error: INSTALL_FAILED_CONFLICTING_PROVIDER解决办法

    Please check logcat output for more details. Launch canceled! ``` 解决这个问题的方法通常涉及到修改`AndroidManifest.xml`文件中关于`<provider>`的设置。以下是几个可能的解决步骤: 1. **检查并更改`android...

    解决 INSTALL FAILED CONFLICTING PROVIDER的问题方法

    在Android开发过程中,有时会遇到一个令人困扰的问题,即`INSTALL FAILED CONFLICTING PROVIDER`。这个错误通常出现在尝试安装一个新的应用时,由于系统检测到新应用中的Content Provider(内容提供者)与已经安装在...

    Pro+Spring+Dynamic+Modules+for+OSGi+Service+Platforms

    to avoid running multiple JARs with the same name that may contain conflicting classes. OSGi eliminates this burden, letting you install and run as many different JAR versions as required in a single ...

    Introduction_to_Optimum_Design.pdf

    This chapter delves into more advanced concepts related to optimum design, including definitions of global and local minima, necessary and sufficient conditions for optimality, and constrained ...

    conflicting-capitalizations-issue

    冲突大小写问题此自述文件概述了在此 Ember 应用程序上进行协作的详细信息。 这个应用程序的简短介绍可以很容易地转到这里。先决条件您将需要在您的计算机上正确安装以下东西。 (带有 NPM)安装git clone 这个仓库...

    Hibernate_Tools_for_Eclipse插件的安装包和使用说明

    **Hibernate Tools for Eclipse 插件安装与使用指南** Hibernate Tools是Eclipse集成开发环境中的一款强大插件,它为开发者提供了方便的Hibernate实体类生成、数据库反向工程、SQL执行及对象关系映射(ORM)配置等...

    libfaketime:libfaketime修改单个应用程序的系统时间

    **标题与描述解析** 标题"libfaketime:libfaketime修改单个应用程序的系统时间"揭示了一个名为libfaketime的库,其主要功能是允许开发者在不改变全局系统时间的情况下,针对特定的应用程序调整时间环境。...

    DLNASample

    【DLNA技术详解】 DLNA(Digital Living Network Alliance),即数字生活网络联盟,是一个由多家科技公司共同发起的标准化组织,旨在推动家庭网络中的多媒体设备之间的互联互通。DLNA标准允许不同品牌和操作系统的...

    win 3.11 for workgroup tcpip支持

    RELEASE NOTES FOR MICROSOFT(R) TCP/IP-32 FOR WINDOWS(TM) FOR WORKGROUPS 3.11 PLEASE READ THIS ENTIRE DOCUMENT General ------- This product is compatible with, and supported exclusively on, the ...

    polycom宝利通视频会议软件3.9 2018

    If you have received the SOFTWARE PRODUCT for purposes of evaluation (“Demonstration”) or you have purchased a Laboratory or Developer License then this SOFTWARE PRODUCT is licensed to you per the ...

    串口通讯控件

    due to fixed defaults conflicting with driver queue size defaults. - Changed default for sendTimeoutMultiplier for not NT-based platform to a high value as W98 etc. do not seem to interpret 0 as ...

    UCP600(中英文对照版)

    By establishing clear definitions, obligations, and procedures, UCP600 aims to provide a standardized approach to the issuance, notification, examination of documents, and reimbursement processes ...

    vue版本冲突 解决 替换包

    运行vue项目时,启动报错 error in ./~/_element-ui@2.7.2@element-ui/packages/form/src/label-wrap.vue Syntax Erroe:Unexpected token (20:14) ;; 将此压缩包解压到node_moudel里面找到 element-ui,替换即可

    Having two conflicting minds? Examining the link among leaders' cognitive thinking style, employee creative self-efficacy and employee creative performance

    本研究探讨了领导者的认知思维风格,特别是辩证思维,对员工创新力的影响。辩证思维是一种认知倾向,指的是能够容忍矛盾、期待变化以及全面思考问题的能力。文化背景塑造了人们不同的认知模式,研究发现中国人更倾向...

    调试日志1

    第一个错误是`ArgumentError: argument --batch_size: conflicting option string: --batch_size`。这个错误通常意味着命令行参数解析时出现了冲突。在启动程序时,确保没有重复指定`--batch_size`选项,或者检查你...

    英文原版-Data Privacy Principles and Practice 1st Edition

    The principles outline best practices and reflect on the conflicting relationship between privacy and utility. From a practice standpoint, it provides practitioners and researchers with a definitive ...

Global site tag (gtag.js) - Google Analytics