Update pidfile property and add documentation

Change the pidfile property from `spring.application.pidfile` to
`spring.pidfile` (to save confusion with SpringApplication properties).

Also added documentation and meta-data information.

See gh-1579
pull/1840/merge
Phillip Webb 10 years ago
parent 3d3ca42318
commit ea6162254d

@ -53,7 +53,7 @@ public class ApplicationPidFileWriter implements
private static final String[] SYSTEM_PROPERTY_VARIABLES = { "PIDFILE", "pidfile" };
private static final String SPRING_PROPERTY = "spring.application.pidfile";
private static final String SPRING_PROPERTY = "spring.pidfile";
private static final AtomicBoolean created = new AtomicBoolean(false);

@ -3,6 +3,12 @@
"name": "spring.git.properties",
"dataType": "java.lang.String",
"description": "Resource reference to a generated git info properties file."
}.
{
"name": "spring.pidfile",
"dataType": "java.lang.String",
"description": "The location of the PID file to write (if ApplicationPidFileWriter is used).",
sourceType: "org.springframework.boot.actuate.system.ApplicationPidFileWriter"
}
]}

@ -87,7 +87,7 @@ public class ApplicationPidFileWriterTests {
File file = this.temporaryFolder.newFile();
ConfigurableEnvironment environment = new StandardEnvironment();
MockPropertySource propertySource = new MockPropertySource();
propertySource.setProperty("spring.application.pidfile", file.getAbsolutePath());
propertySource.setProperty("spring.pidfile", file.getAbsolutePath());
environment.getPropertySources().addLast(propertySource);
ConfigurableApplicationContext context = mock(ConfigurableApplicationContext.class);
given(context.getEnvironment()).willReturn(environment);
@ -103,7 +103,7 @@ public class ApplicationPidFileWriterTests {
File file = this.temporaryFolder.newFile();
ConfigurableEnvironment environment = new StandardEnvironment();
MockPropertySource propertySource = new MockPropertySource();
propertySource.setProperty("spring.application.pidfile", file.getAbsolutePath());
propertySource.setProperty("spring.pidfile", file.getAbsolutePath());
environment.getPropertySources().addLast(propertySource);
ApplicationEnvironmentPreparedEvent event = new ApplicationEnvironmentPreparedEvent(
new SpringApplication(), new String[] {}, environment);

@ -356,6 +356,9 @@ content into your application; rather pick only the properties that you need.
management.contextPath= # default to '/'
management.add-application-context-header= # default to true
# PID FILE ({sc-spring-boot-actuator}/system/ApplicationPidFileWriter.{sc-ext}[ApplicationPidFileWriter])
spring.pidfile= # Location of the PID file to write
# ENDPOINTS ({sc-spring-boot-actuator}/endpoint/AbstractEndpoint.{sc-ext}[AbstractEndpoint] subclasses)
endpoints.autoconfig.id=autoconfig
endpoints.autoconfig.sensitive=true

Loading…
Cancel
Save