使用srping-rest-mvc 的时候只要在工程的classpath中包含jackson的2.x版本,就可以不用自己做json格式的转换了。

如在你的pom文件中加入以下的依赖:

<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>2.5.4</version>
</dependency>

别忘了model的get,set方法

相关文章:

  • 2021-11-17
  • 2022-02-09
  • 2022-12-23
  • 2021-10-09
  • 2023-03-22
  • 2021-07-27
猜你喜欢
  • 2021-09-29
  • 2021-08-05
  • 2022-12-23
  • 2022-01-02
  • 2021-08-15
  • 2022-02-09
相关资源
相似解决方案