`

can not find xxx.xxx

阅读更多
问题描述:

单元测试一个已离职同事的接口,运行时提示 po 类中的某个属性字段的映射找不到

问题分析:

根据描述的异常信息,在类中找到了该属性,set get 均有,mapper.xml 中映射也存在

检查代码版本,历史版本生产环境运行正常,于是对比此次新增的代码

定位到了问题所在,

po 类中 描述用户类型的字段,用的 isXXX

po 类中 又定义了常量  IsXXX 与 属性字段仅仅首字母不同

所以,Mapper.xml 中的文件在做映射处理时,首先映射的是常量的定义的字段,而该字段又没有SET GET ,因而报错

问题总结:

1.常量不要写在PO类中,而要单独写在 constant 类中

2.Boolean 类型的属性,不要以 is开头
分享到:
评论

相关推荐

    xcode配置iOS 13.3 开发包

    将Xcode适配可以调试、编译、运行、打包系统版本号为iOS 13.3 版本的设备,解决"Could not find Developer Disk Image"问题 使用详情 请前往https://blog.csdn.net/u010731949/article/details/52576792

    TORO Sentinel SuperPro Emulator 1.7

    system32 directory to find a XXX.TORO file. XXXX is DeveloperID in hex format. i attached an example of such file(A870.TORO). this is for emulation of wlscgen.exe from sentinellm 7.3.0. the ...

    WINCE can驱动

    This file contains a summary of what you will find in each of the files that make up your can_mfc application. can_mfc.h This is the main header file for the application. It includes other project ...

    xLAN(获取局域网IP、MAC、用户名)

    will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the...

    仿msn(网易泡泡)界面

    will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the...

    千年封包解密库

    will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the...

    DVR-MPEG4编码播放器

    will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the...

    ip包分析

    will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the...

    win2k下用winsock原始套接字抓包

    will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the...

    DelForExD2007

    On these pages you can find many other useful components too. Q: Have you also created a similar formatter for C++, Java or Visual Basic? A: No, I am sorry, I have only created one for Delphi. ...

    类似qq的开发

    will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the...

    StringToken

    will need to copy the corresponding localized resources MFC40XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the...

    网络管理 snmp manager

    will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the...

    EhLib 9.1.024

    TSQLDataDriverEh can not transfer queries to the server but it call global (for application) event which it is necessary to write to execute SQL expressions on the server. TBDEDataDriverEh, ...

    ap6212a0_a33_sc3817r_神舟验证版本_借用nvram_ap6210这个配置文件_20170626_1834没有外层目录.7z

    # $(call find-copy-subdir-files,*,device/softwinner/polaris-common/rild/usb_modeswitch.d,system/etc/usb_modeswitch.d) PRODUCT_PROPERTY_OVERRIDES += \ ro.sw.embeded.telephony = false PRODUCT_...

    北大天网搜索引擎TSE源码

    1) execute "tar xvfz tse.XXX.gz" --------------------------- Before running the program, note Note: The program is default for normal crawling (SE). For ImgSE, you should: 1. change codes with the...

    DebuggingWithGDB 6.8-2008

    Table of Contents Summary of gdb . . . . . . . . ....Free Software ....Free Software Needs Free Documentation ....Contributors to gdb....1 A Sample gdb Session ....2 Getting In and Out of gdb ....2.1 Invoking gdb ....

    CustDlg.zip

    will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the ...

    Thinking in LINQ

    xxxi Introduction This book won’t teach you the basics of LINQ. It will teach you how to use it appropriately. Having a jackhammer is great only if you know how to use it properly; otherwise, you are...

    二十四点源程序

    will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the...

Global site tag (gtag.js) - Google Analytics