更新时间:2022-12-31 13:31:00
我终于找到了答案。我添加了
I finally found my answer. I added
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.8</version>
</dependency>
到我的pom.xml文件。然后我添加了
to my pom.xml file. Then I added
<init-param>
<param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
<param-value>true</param-value>
</init-param>
到我的web.xml文件,一切正常。我的代码无需更改。
to my web.xml file, and everything works fine. No change was required to my code above.