58.3. 使用 Jolokia Restrictor


为避免公开所有 JMX MBeans (请参阅 安全 注意事项),它提供了一个默认的 Jolokia Restrictor,仅允许 Camel 相关数据和来自 java 的一些基本信息。可以避免将 restrictor 与属性 camel.component.jolokia.use-camel-restrictor=false 一起使用,或者将您自己的自定义程序与属性 camel.component.jolokia.server-config.restrictorClass=org.example.MyRestrictor 一起使用。

如下为扩展提供的 restrictor 的示例。

Example

public class MyRestrictor extends CamelRestrictor {

	//getDefaultDomains() contains default domains, if you want to add some domain to the existing list
	@Override
	protected List<String> getAllowedDomains() {
		final List<String> newDomains = new ArrayList<>(getDefaultDomains());
		newDomains.add("my.domain");
		return newDomains;
	}
}
Copy to Clipboard Toggle word wrap

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat