From eadb30330447f3262c4b2073ca72053515b4d623 Mon Sep 17 00:00:00 2001 From: qibaoguang Date: Mon, 2 Mar 2015 23:42:44 +0800 Subject: [PATCH] Update and rename 42.1. Customizing MBean names to 42.1. Customizing MBean names.md --- .../42.1. Customizing MBean names | 0 .../42.1. Customizing MBean names.md | 10 ++++++++++ 2 files changed, 10 insertions(+) delete mode 100644 V. Spring Boot Actuator: Production-ready features/42.1. Customizing MBean names create mode 100644 V. Spring Boot Actuator: Production-ready features/42.1. Customizing MBean names.md diff --git a/V. Spring Boot Actuator: Production-ready features/42.1. Customizing MBean names b/V. Spring Boot Actuator: Production-ready features/42.1. Customizing MBean names deleted file mode 100644 index e69de29..0000000 diff --git a/V. Spring Boot Actuator: Production-ready features/42.1. Customizing MBean names.md b/V. Spring Boot Actuator: Production-ready features/42.1. Customizing MBean names.md new file mode 100644 index 0000000..a9aff1d --- /dev/null +++ b/V. Spring Boot Actuator: Production-ready features/42.1. Customizing MBean names.md @@ -0,0 +1,10 @@ +### 42.1. 自定义MBean名称 + +MBean的名称通常产生于端点的id。例如,health端点被暴露为`org.springframework.boot/Endpoint/HealthEndpoint`。 + +如果你的应用包含多个Spring ApplicationContext,你会发现存在名称冲突。为了解决这个问题,你可以将`endpoints.jmx.uniqueNames`设置为true,这样MBean的名称总是唯一的。 + +你也可以自定义JMX域,所有的端点都在该域下暴露。这里有个application.properties示例: +```java +endpoints.jmx.domain=myapp +endpoints.jmx.uniqueNames=true