Skip to content

Commit 76ca467

Browse files
committed
Merge branch '2.1.x'
2 parents 90160b1 + bd2cc6f commit 76ca467

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/logging/LogFileWebEndpointAutoConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package org.springframework.boot.actuate.autoconfigure.logging;
1818

19+
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnEnabledEndpoint;
1920
import org.springframework.boot.actuate.logging.LogFileWebEndpoint;
2021
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
2122
import org.springframework.boot.autoconfigure.condition.ConditionMessage;
@@ -40,6 +41,7 @@
4041
* @since 2.0.0
4142
*/
4243
@Configuration(proxyBeanMethods = false)
44+
@ConditionalOnEnabledEndpoint(endpoint = LogFileWebEndpoint.class)
4345
@EnableConfigurationProperties(LogFileWebEndpointProperties.class)
4446
public class LogFileWebEndpointAutoConfiguration {
4547

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/logging/LogFileWebEndpointAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -89,7 +89,7 @@ public void logFileWebEndpointCanBeDisabled() {
8989
.withPropertyValues("logging.file.name:test.log",
9090
"management.endpoint.logfile.enabled:false")
9191
.run((context) -> assertThat(context)
92-
.hasSingleBean(LogFileWebEndpoint.class));
92+
.doesNotHaveBean(LogFileWebEndpoint.class));
9393
}
9494

9595
@Test

0 commit comments

Comments
 (0)