Via this question on Stack Overflow, when JmxEndpointExporter
is lazy, nothing triggers its creation so the endpoints are not exported as MBeans. The problem can be worked around by excluding the exporter from lazy initialization:
@Bean
LazyInitializationExcludeFilter eagerJmxEndpointExport() {
return LazyInitializationExcludeFilter.forBeanTypes(JmxEndpointExporter.class);
}