依赖 <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>2.0.17</version> </dependency> 使用 LoginOutDto loginOutDto = JSONObject.parseObject(JSON.toJSONString(data), new TypeReference<LoginOutDto>() { });