springmvc 格式化使用Jackjson格式化報Failed to write HTTP message


Failed to write HTTP message:

org.springframework.http.converter.HttpMessageNotWritableException:

Could not write content: (was java.lang.NullPointerException)

需要添加jar包,薦使用woodstox-core-asl(Spring官方也推薦這個):

<dependency> <groupId>org.codehaus.woodstox</groupId> <artifactId>woodstox-core-asl</artifactId> <version>4.4.1</version> </dependency>

因此添加上面的woodstox-core-asl依賴即可解決問題。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM