pull/4432/head
Phillip Webb 9 years ago
parent aa8d0dd072
commit 332c6911cf

@ -36,6 +36,14 @@ public class DocsMvcEndpoint extends WebMvcConfigurerAdapter implements MvcEndpo
private String path = "/docs";
/**
* Enable the endpoint.
*/
private boolean enabled = true;
/**
* Mark if the endpoint exposes sensitive information.
*/
private boolean sensitive;
private final ManagementServletContext managementServletContext;
@ -78,8 +86,12 @@ public class DocsMvcEndpoint extends WebMvcConfigurerAdapter implements MvcEndpo
return this.path;
}
public void setSensitive(boolean sensitive) {
this.sensitive = sensitive;
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@Override
@ -87,6 +99,10 @@ public class DocsMvcEndpoint extends WebMvcConfigurerAdapter implements MvcEndpo
return this.sensitive;
}
public void setSensitive(boolean sensitive) {
this.sensitive = sensitive;
}
@Override
public Class<? extends Endpoint<?>> getEndpointType() {
return null;

@ -37,8 +37,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
* @since 1.3.0
*/
@ConfigurationProperties("endpoints.actuator")
public class HalJsonMvcEndpoint extends WebMvcConfigurerAdapter
implements MvcEndpoint {
public class HalJsonMvcEndpoint extends WebMvcConfigurerAdapter implements MvcEndpoint {
/**
* Endpoint URL path.
@ -48,14 +47,14 @@ public class HalJsonMvcEndpoint extends WebMvcConfigurerAdapter
private String path;
/**
* Enable security on the endpoint.
* Enable the endpoint.
*/
private boolean sensitive = false;
private boolean enabled = true;
/**
* Enable the endpoint.
* Mark if the endpoint exposes sensitive information.
*/
private boolean enabled = true;
private boolean sensitive = false;
private final ManagementServletContext managementServletContext;
@ -86,6 +85,14 @@ public class HalJsonMvcEndpoint extends WebMvcConfigurerAdapter
return this.path;
}
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@Override
public boolean isSensitive() {
return this.sensitive;
@ -95,14 +102,6 @@ public class HalJsonMvcEndpoint extends WebMvcConfigurerAdapter
this.sensitive = sensitive;
}
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@Override
public Class<? extends Endpoint<?>> getEndpointType() {
return null;

@ -58,14 +58,14 @@ public class JolokiaMvcEndpoint implements MvcEndpoint, InitializingBean,
private String path = "/jolokia";;
/**
* Enable security on the endpoint.
* Enable the endpoint.
*/
private boolean sensitive = true;
private boolean enabled = true;
/**
* Enable the endpoint.
* Mark if the endpoint exposes sensitive information.
*/
private boolean enabled = true;
private boolean sensitive = true;
private final ServletWrappingController controller = new ServletWrappingController();
@ -103,21 +103,21 @@ public class JolokiaMvcEndpoint implements MvcEndpoint, InitializingBean,
}
@Override
public String getPath() {
return this.path;
public boolean isSensitive() {
return this.sensitive;
}
public void setPath(String path) {
this.path = path;
public void setSensitive(boolean sensitive) {
this.sensitive = sensitive;
}
@Override
public boolean isSensitive() {
return this.sensitive;
public String getPath() {
return this.path;
}
public void setSensitive(boolean sensitive) {
this.sensitive = sensitive;
public void setPath(String path) {
this.path = path;
}
@Override

@ -60,14 +60,14 @@ public class LogFileMvcEndpoint implements MvcEndpoint, EnvironmentAware {
private String path = "/logfile";
/**
* Enable security on the endpoint.
* Enable the endpoint.
*/
private boolean sensitive = true;
private boolean enabled = true;
/**
* Enable the endpoint.
* Mark if the endpoint exposes sensitive information.
*/
private boolean enabled = true;
private boolean sensitive = true;
private Environment environment;
@ -85,6 +85,14 @@ public class LogFileMvcEndpoint implements MvcEndpoint, EnvironmentAware {
this.path = path;
}
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@Override
public boolean isSensitive() {
return this.sensitive;
@ -94,14 +102,6 @@ public class LogFileMvcEndpoint implements MvcEndpoint, EnvironmentAware {
this.sensitive = sensitive;
}
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@Override
@SuppressWarnings("rawtypes")
public Class<? extends Endpoint> getEndpointType() {

@ -67,4 +67,5 @@ public class ManagementErrorEndpoint implements MvcEndpoint {
public Class<? extends Endpoint> getEndpointType() {
return null;
}
}

@ -17,24 +17,12 @@
"sourceType": "org.springframework.boot.actuate.endpoint.EnvironmentEndpoint",
"description": "Keys that should be sanitized. Keys can be simple strings that the property ends with or regex expressions."
},
{
"name": "endpoints.docs.enabled",
"type": "java.lang.Boolean",
"description": "Enable actuator docs endpoint.",
"defaultValue": true
},
{
"name": "endpoints.jmx.enabled",
"type": "java.lang.Boolean",
"description": "Enable JMX export of all endpoints.",
"defaultValue": true
},
{
"name": "endpoints.jolokia.enabled",
"type": "java.lang.Boolean",
"description": "Enable Jolokia endpoint.",
"defaultValue": true
},
{
"name": "info",
"type": "java.util.Map<java.lang.String,java.lang.Object>",

Loading…
Cancel
Save