I have a Spring Boot console application and I access the actuator endpoints over JMX. The problem is that the returned text is not pretty-printed and it's not JSON. It looks something like this:
{context=application, parent=null, beans=[{bean=helloWorldApplication, scope=singleton, type=com.surpreso.spring_skeleton.HelloWorldApplication, resource=null, dependencies=[helloWorldService]}, {bean=helloWorldService, scope=singleton, type=com.surpreso.spring_skeleton.HelloWorldService, resource=file [C:/src-tmp/spring-skeleton/target/classes/com/surpreso/spring_skeleton/HelloWorldService.class], dependencies=[]}, {bean=com.surpreso.spring_skeleton.DefaultConfig, ...
What the best way to get this into a readable format? Is it possible to configure the JMX actuator to pretty-print? Is it possible to configure the JMX actuator to use JSON?
There's a related question about Pretty print JSON output of Spring Boot Actuator endpoints, but in this case I'm stuck with JMX because I don't have a web application. As the next step I'll try CRaSH, but I was curious if I can configure the JMX actuator to be more usable.
I'm using version 1.2.5 of Spring Boot.
UPDATE: The CRaSH implementation uses the same format, so it's not a solution.
UPDATE 2: I see this commit in 1.3.0 about "Use configured ObjectMapper, if available, in all EndpointMBeans" but I don't know what properties to set for pretty printing. It's close ...
UPDATE 3: spring.jackson.serialization.indent_output=true
did not have any effect through the CRaSH interface. I'm on 1.3.0.M2 now.