枚举类使用Jackson进行序列化与反序列化(How To Serialize and Deserialize Enums with Jackson)
Let’sdefinethefollowingEnum:publicenumDistance{KILOMETER("km",1000),MILE("miles",1609.34),METER("meters",1),INCH("inches",0.0254),CENTIMETER("cm",0.01),MILLIMETER("mm",0.001);privateStringunit;private