问题:

实体类属性

Spring Boot解决向前端返回对象时的属性无序问题

现在返回EmployeeMatrix对象到前端,属性顺序乱了,通过Postman测试的结果如下所示,

Spring Boot解决向前端返回对象时的属性无序问题

解决方法:

添加@JsonPropertyOrder注解

Spring Boot解决向前端返回对象时的属性无序问题

再次使用Postman测试,如下如所示

Spring Boot解决向前端返回对象时的属性无序问题

相关文章:

  • 2021-08-16
  • 2021-08-12
  • 2021-09-25
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
猜你喜欢
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2022-01-22
  • 2021-11-15
  • 2022-12-23
相关资源
相似解决方案