Skip to content

Commit 2084968

Browse files
authored
Fix conditional on property. Next bugfix version in pom.xml (#39)
1 parent a4110d3 commit 2084968

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111
<groupId>de.mirkosertic</groupId>
1212
<artifactId>flight-recorder-starter</artifactId>
13-
<version>2.2.0-SNAPSHOT</version>
13+
<version>2.2.1-SNAPSHOT</version>
1414
<name>flight-recorder-starter</name>
1515
<description>Spring Boot 2 starter for Java Flight Recorder Actuator Endpoint</description>
1616
<packaging>jar</packaging>

src/main/java/de/mirkosertic/flightrecorderstarter/configuration/ManagementConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
import de.mirkosertic.flightrecorderstarter.core.FlightRecorder;
66
import org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration;
77
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
8+
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
89
import org.springframework.context.ApplicationContext;
910
import org.springframework.context.annotation.Bean;
1011

1112
@ManagementContextConfiguration
13+
@ConditionalOnProperty(prefix = "flightrecorder", name = "enabled", havingValue = "true", matchIfMissing = true)
1214
@AutoConfigureAfter(FlightRecorderAutoConfiguration.class)
1315
public class ManagementConfiguration {
1416

0 commit comments

Comments
 (0)