Why does Jackson 2 not recognize the first capital letter if the leading camel case word is only a single letter long?

后端 未结 5 1821
自闭症患者
自闭症患者 2020-12-04 14:16

I\'m using Spring 4 MVC with Jackson 2 for my service. For one of the operations I have a request object that has an attribute where the leading camel case word this is only

5条回答
  •  星月不相逢
    2020-12-04 14:59

    I got the same problem on Kotlin. Resolved by using Use the @JsonProperty annotation to the accessor methods.

    For example: @get:JsonProperty("ID") val id: String = ""

提交回复
热议问题