> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/v.-spring-boot-actuator/52.-monitoring-and-management-over-jmx/52.1-customizing-mbean-names.md).

# 52.1 自定义MBean名称

MBean的名称通常产生于端点的`id`。例如，`health`端点被暴露为`org.springframework.boot:type=Endpoint,name=Health`。

如果应用包含多个Spring `ApplicationContext`，你会发现存在名称冲突。为了解决这个问题，你可以将`management.endpoints.jmx.unique-names`设置为`true`，这样MBean的名称总是唯一的。

你也可以自定义端点暴露的JMX域，具体可参考以下`application.properties`示例：

```
management.endpoints.jmx.domain=com.example.myapp
management.endpoints.jmx.unique-names=true
```
