message: "Could not write JSON: (was java.lang.NullPointerException); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: java.util.HashMap["data"]->java.util.ArrayList[1]->com.boot.security.server.dto.MyLotteryDto["level_alias"])"
出现这个错误原因是数据库记录里的枚举字段值为空或者枚举值与枚举类值不匹配造成的,改正这两点就可以了。