Skip to content

Commit 411a1f3

Browse files
committed
Pull up setDisableMBeanRegistry to ConfigurableTomcatWebServerFactory
1 parent 3b8148e commit 411a1f3

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/ConfigurableTomcatWebServerFactory.java

+7
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ public interface ConfigurableTomcatWebServerFactory extends ConfigurableWebServe
4848
*/
4949
void setBackgroundProcessorDelay(int delay);
5050

51+
/**
52+
* Set whether the factory should disable Tomcat's MBean registry prior to creating
53+
* the server.
54+
* @param disableMBeanRegistry whether to disable the MBean registry
55+
*/
56+
void setDisableMBeanRegistry(boolean disableMBeanRegistry);
57+
5158
/**
5259
* Add {@link Valve}s that should be applied to the Tomcat {@link Engine}.
5360
* @param engineValves the valves to add

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java

+5-10
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,11 @@ public void setBackgroundProcessorDelay(int delay) {
262262
this.backgroundProcessorDelay = delay;
263263
}
264264

265+
@Override
266+
public void setDisableMBeanRegistry(boolean disableMBeanRegistry) {
267+
this.disableMBeanRegistry = disableMBeanRegistry;
268+
}
269+
265270
/**
266271
* Set {@link TomcatContextCustomizer}s that should be applied to the Tomcat
267272
* {@link Context}. Calling this method will replace any existing customizers.
@@ -462,14 +467,4 @@ public void setProtocol(String protocol) {
462467
this.protocol = protocol;
463468
}
464469

465-
/**
466-
* Set whether the factory should disable Tomcat's MBean registry prior to creating
467-
* the server.
468-
* @param disableMBeanRegistry whether to disable the MBean registry
469-
* @since 2.2.0
470-
*/
471-
public void setDisableMBeanRegistry(boolean disableMBeanRegistry) {
472-
this.disableMBeanRegistry = disableMBeanRegistry;
473-
}
474-
475470
}

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -770,12 +770,7 @@ public void setBackgroundProcessorDelay(int delay) {
770770
this.backgroundProcessorDelay = delay;
771771
}
772772

773-
/**
774-
* Set whether the factory should disable Tomcat's MBean registry prior to creating
775-
* the server.
776-
* @param disableMBeanRegistry whether to disable the MBean registry
777-
* @since 2.2.0
778-
*/
773+
@Override
779774
public void setDisableMBeanRegistry(boolean disableMBeanRegistry) {
780775
this.disableMBeanRegistry = disableMBeanRegistry;
781776
}

0 commit comments

Comments
 (0)