如何让Jackson的build()方法完美打印其JSON输出?

neu*_*242 16 spring json pretty-print jersey jackson

我使用Spring,Jersey和Jackson来提供生成JSON的API.

我的@Component有一个@Get方法,它返回Response.ok(entity).build().

输出非常紧凑.如何使输出漂亮/格式化?