hytex
V2EX  ›  问与答

有关 mybatis 的 callSettersOnNulls 无效的问题,请教各位

  •  
  •   hytex · Dec 10, 2020 · 1328 views
    This topic created in 2002 days ago, the information mentioned may be changed or developed.

    此配置是为了在 mybatis 中,当查询的值为 null,且返回的类型为 map 的时候,自动填充 key,value 为 null 。 我使用了这个配置,居然无效,导致整个 map 为 null,在百度和 Google 了各种回答之后,仍没办法解决,故到此请教下各位,以前是否有出现过这种问题,方便说下怎么解决的么。

    springboot 版本为 2.1.9 mybatis 版本为 3.5.4 (看了貌似 3.2 之后都支持自动填充 null 的 key )

    PS: 驼峰注解有用,说明配置文件是读取到了的。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5778 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 02:47 · PVG 10:47 · LAX 19:47 · JFK 22:47
    ♥ Do have faith in what you're doing.