在开发过程中,使用@JsonProperty对个别属性序列化时指定别名,发现不起作用。百般查找原因。最后发现导 错包了。
@JsonProperty的正确包名应该是
com.fasterxml.jackson.annotation.JsonProperty
而不是
org.codehaus.jackson.annotate.JsonProperty
在开发过程中,使用@JsonProperty对个别属性序列化时指定别名,发现不起作用。百般查找原因。最后发现导 错包了。
@JsonProperty的正确包名应该是
com.fasterxml.jackson.annotation.JsonProperty
而不是
org.codehaus.jackson.annotate.JsonProperty