File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 45
45
import org .springframework .boot .autoconfigure .PropertyPlaceholderAutoConfiguration ;
46
46
import org .springframework .boot .autoconfigure .condition .ConditionalOnBean ;
47
47
import org .springframework .boot .autoconfigure .condition .ConditionalOnClass ;
48
+ import org .springframework .boot .autoconfigure .condition .ConditionalOnExpression ;
48
49
import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
49
50
import org .springframework .boot .autoconfigure .condition .ConditionalOnWebApplication ;
50
51
import org .springframework .boot .autoconfigure .web .DispatcherServletAutoConfiguration ;
@@ -147,18 +148,21 @@ public MvcEndpoints mvcEndpoints() {
147
148
148
149
@ Bean
149
150
@ ConditionalOnBean (EnvironmentEndpoint .class )
151
+ @ ConditionalOnExpression ("${endpoints.env.enabled:true}" )
150
152
public EnvironmentMvcEndpoint environmentMvcEndpoint (EnvironmentEndpoint delegate ) {
151
153
return new EnvironmentMvcEndpoint (delegate );
152
154
}
153
155
154
156
@ Bean
155
157
@ ConditionalOnBean (MetricsEndpoint .class )
158
+ @ ConditionalOnExpression ("${endpoints.metrics.enabled:true}" )
156
159
public MetricsMvcEndpoint metricsMvcEndpoint (MetricsEndpoint delegate ) {
157
160
return new MetricsMvcEndpoint (delegate );
158
161
}
159
162
160
163
@ Bean
161
164
@ ConditionalOnBean (ShutdownEndpoint .class )
165
+ @ ConditionalOnExpression ("${endpoints.shutdown.enabled:false}" )
162
166
public ShutdownMvcEndpoint shutdownMvcEndpoint (ShutdownEndpoint delegate ) {
163
167
return new ShutdownMvcEndpoint (delegate );
164
168
}
You can’t perform that action at this time.
0 commit comments