Skip to content

Commit 83afef4

Browse files
committed
Start building against Micrometer 1.14.0 snapshots
See gh-42555
1 parent 69162f4 commit 83afef4

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/elastic/ElasticProperties.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2024 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.
@@ -79,6 +79,12 @@ public class ElasticProperties extends StepRegistryProperties {
7979
*/
8080
private String apiKeyCredentials;
8181

82+
/**
83+
* Whether to enable _source in the default index template when auto-creating the
84+
* index.
85+
*/
86+
private boolean enableSource = false;
87+
8288
public String getHost() {
8389
return this.host;
8490
}
@@ -159,4 +165,12 @@ public void setApiKeyCredentials(String apiKeyCredentials) {
159165
this.apiKeyCredentials = apiKeyCredentials;
160166
}
161167

168+
public boolean isEnableSource() {
169+
return this.enableSource;
170+
}
171+
172+
public void setEnableSource(boolean enableSource) {
173+
this.enableSource = enableSource;
174+
}
175+
162176
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/elastic/ElasticPropertiesConfigAdapter.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2024 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.
@@ -87,4 +87,9 @@ public String apiKeyCredentials() {
8787
return get(ElasticProperties::getApiKeyCredentials, ElasticConfig.super::apiKeyCredentials);
8888
}
8989

90+
@Override
91+
public boolean enableSource() {
92+
return get(ElasticProperties::isEnableSource, ElasticConfig.super::enableSource);
93+
}
94+
9095
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/elastic/ElasticPropertiesConfigAdapterTests.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 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.
@@ -104,4 +104,11 @@ void whenPropertiesApiKeyCredentialsIsSetAdapterPipelineReturnsIt() {
104104
assertThat(new ElasticPropertiesConfigAdapter(properties).apiKeyCredentials()).isEqualTo("secret");
105105
}
106106

107+
@Test
108+
void whenPropertiesEnableSourceIsSetAdapterEnableSourceReturnsIt() {
109+
ElasticProperties properties = new ElasticProperties();
110+
properties.setEnableSource(true);
111+
assertThat(new ElasticPropertiesConfigAdapter(properties).enableSource()).isTrue();
112+
}
113+
107114
}

spring-boot-project/spring-boot-dependencies/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ bom {
13051305
]
13061306
}
13071307
}
1308-
library("Micrometer", "1.14.0-M3") {
1308+
library("Micrometer", "1.14.0-SNAPSHOT") {
13091309
considerSnapshots()
13101310
group("io.micrometer") {
13111311
modules = [

0 commit comments

Comments
 (0)