Pretty print JSON output of Spring Boot Actuator endpoints

前端 未结 14 1004
终归单人心
终归单人心 2020-12-24 12:30

Spring Boot Actuator provides several endpoints to monitor an application as:

/metrics
/b         


        
14条回答
  •  孤城傲影
    2020-12-24 12:54

    With spring-boot 1.2.6, you need to use:

    spring.jackson.serialization.INDENT_OUTPUT=true
    

    From my log when using the old http.mappers.*:

    http.mappers.json-pretty-print is deprecated. If you are using Jackson, spring.jackson.serialization.INDENT_OUTPUT=true should be used instead.
    

提交回复
热议问题