Commit 988fc18f authored by Andy Wilkinson's avatar Andy Wilkinson

Simplify endpoint enablement and update reference documentation

Closes gh-11755
parent 1880a25c
...@@ -40,7 +40,6 @@ import org.springframework.boot.actuate.endpoint.jmx.annotation.JmxEndpointDisco ...@@ -40,7 +40,6 @@ import org.springframework.boot.actuate.endpoint.jmx.annotation.JmxEndpointDisco
import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate; import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate;
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration; import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
...@@ -58,7 +57,6 @@ import org.springframework.util.ObjectUtils; ...@@ -58,7 +57,6 @@ import org.springframework.util.ObjectUtils;
*/ */
@AutoConfigureAfter(JmxAutoConfiguration.class) @AutoConfigureAfter(JmxAutoConfiguration.class)
@EnableConfigurationProperties(JmxEndpointProperties.class) @EnableConfigurationProperties(JmxEndpointProperties.class)
@ConditionalOnProperty(name = "management.endpoints.jmx.enabled", matchIfMissing = true)
public class JmxEndpointAutoConfiguration { public class JmxEndpointAutoConfiguration {
private final ApplicationContext applicationContext; private final ApplicationContext applicationContext;
......
...@@ -46,7 +46,6 @@ import org.springframework.boot.actuate.endpoint.web.annotation.WebEndpointDisco ...@@ -46,7 +46,6 @@ import org.springframework.boot.actuate.endpoint.web.annotation.WebEndpointDisco
import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
...@@ -66,7 +65,6 @@ import org.springframework.context.annotation.Configuration; ...@@ -66,7 +65,6 @@ import org.springframework.context.annotation.Configuration;
@ConditionalOnWebApplication @ConditionalOnWebApplication
@AutoConfigureAfter(EndpointAutoConfiguration.class) @AutoConfigureAfter(EndpointAutoConfiguration.class)
@EnableConfigurationProperties(WebEndpointProperties.class) @EnableConfigurationProperties(WebEndpointProperties.class)
@ConditionalOnProperty(name = "management.endpoints.web.enabled", matchIfMissing = true)
public class WebEndpointAutoConfiguration { public class WebEndpointAutoConfiguration {
private static final List<String> MEDIA_TYPES = Arrays private static final List<String> MEDIA_TYPES = Arrays
......
...@@ -27,22 +27,10 @@ ...@@ -27,22 +27,10 @@
"type": "java.lang.Boolean", "type": "java.lang.Boolean",
"description": "Whether to enable or disable all endpoints by default." "description": "Whether to enable or disable all endpoints by default."
}, },
{
"name": "management.endpoints.jmx.enabled",
"type": "java.lang.Boolean",
"description": "Whether JMX endpoints are enabled.",
"defaultValue": true
},
{ {
"name": "management.endpoints.jmx.expose", "name": "management.endpoints.jmx.expose",
"defaultValue": "*" "defaultValue": "*"
}, },
{
"name": "management.endpoints.web.enabled",
"type": "java.lang.Boolean",
"description": "Whether web endpoints are enabled.",
"defaultValue": true
},
{ {
"name": "management.endpoints.web.expose", "name": "management.endpoints.web.expose",
"defaultValue": [ "defaultValue": [
......
...@@ -1151,7 +1151,6 @@ content into your application. Rather, pick only the properties that you need. ...@@ -1151,7 +1151,6 @@ content into your application. Rather, pick only the properties that you need.
management.endpoints.enabled-by-default= # Enable or disable all endpoints by default. management.endpoints.enabled-by-default= # Enable or disable all endpoints by default.
# ENDPOINTS JMX CONFIGURATION ({sc-spring-boot-actuator-autoconfigure}/endpoint/jmx/JmxEndpointProperties.{sc-ext}[JmxEndpointProperties]) # ENDPOINTS JMX CONFIGURATION ({sc-spring-boot-actuator-autoconfigure}/endpoint/jmx/JmxEndpointProperties.{sc-ext}[JmxEndpointProperties])
management.endpoints.jmx.enabled=true # Whether JMX endpoints are enabled.
management.endpoints.jmx.expose=* # Endpoint IDs that should be exposed or '*' for all. management.endpoints.jmx.expose=* # Endpoint IDs that should be exposed or '*' for all.
management.endpoints.jmx.exclude= # Endpoint IDs that should be excluded. management.endpoints.jmx.exclude= # Endpoint IDs that should be excluded.
management.endpoints.jmx.domain=org.springframework.boot # Endpoints JMX domain name. Fallback to 'spring.jmx.default-domain' if set. management.endpoints.jmx.domain=org.springframework.boot # Endpoints JMX domain name. Fallback to 'spring.jmx.default-domain' if set.
...@@ -1159,7 +1158,6 @@ content into your application. Rather, pick only the properties that you need. ...@@ -1159,7 +1158,6 @@ content into your application. Rather, pick only the properties that you need.
management.endpoints.jmx.unique-names=false # Whether to ensure that ObjectNames are modified in case of conflict. management.endpoints.jmx.unique-names=false # Whether to ensure that ObjectNames are modified in case of conflict.
# ENDPOINTS WEB CONFIGURATION ({sc-spring-boot-actuator-autoconfigure}/endpoint/web/WebEndpointProperties.{sc-ext}[WebEndpointProperties]) # ENDPOINTS WEB CONFIGURATION ({sc-spring-boot-actuator-autoconfigure}/endpoint/web/WebEndpointProperties.{sc-ext}[WebEndpointProperties])
management.endpoints.web.enabled=true # Whether web endpoints are enabled
management.endpoints.web.expose=info,health # Endpoint IDs that should be exposed or '*' for all. management.endpoints.web.expose=info,health # Endpoint IDs that should be exposed or '*' for all.
management.endpoints.web.exclude= # Endpoint IDs that should be excluded. management.endpoints.web.exclude= # Endpoint IDs that should be excluded.
management.endpoints.web.base-path=/actuator # Base path for Web endpoints. Relative to server.servlet.context-path or management.server.servlet.context-path if management.server.port is configured. management.endpoints.web.base-path=/actuator # Base path for Web endpoints. Relative to server.servlet.context-path or management.server.servlet.context-path if management.server.port is configured.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment