Skip to content

When lazy initialization is enabled, JMX endpoints are not available #28335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wilkinsona opened this issue Oct 14, 2021 · 0 comments
Closed
Assignees
Labels
type: bug A general bug
Milestone

Comments

@wilkinsona
Copy link
Member

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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant