From 2c5c539bf1b4da338db18a0756df5389986f9ecc Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 20 Jan 2017 10:52:55 +0100 Subject: [PATCH 1/2] Document automatic scheduling of metrics export Closes gh-8040 --- .../src/main/asciidoc/production-ready-features.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index ddd4686c907..36c99a88b3f 100644 --- a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -1160,6 +1160,10 @@ metric updates every 5 seconds (configured via `spring.metrics.export.delay-mill In addition, any `MetricReader` that you define and mark as `@ExportMetricReader` will have its values exported by the default exporter. +NOTE: This feature is enabling scheduling in your application (`@EnableScheduling`) which +can be a problem if you run an integration tests as your own scheduled tasks will start. +You can disable this behaviour by setting `spring.metrics.export.enabled` to `false`. + The default exporter is a `MetricCopyExporter` which tries to optimize itself by not copying values that haven't changed since it was last called (the optimization can be switched off using a flag `spring.metrics.export.send-latest`). Note also that the From 6fba1381c18e42d16e37985dfc0f24f019e6aca5 Mon Sep 17 00:00:00 2001 From: Rafael Rollo Date: Thu, 19 Jan 2017 19:32:40 -0200 Subject: [PATCH 2/2] Indenting SpringApplication javadoc code Closes gh-8039 --- .../java/org/springframework/boot/SpringApplication.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java b/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java index d38392cdbe2..9d58a034b2e 100644 --- a/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java +++ b/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java @@ -96,10 +96,11 @@ import org.springframework.web.context.support.StandardServletEnvironment; * @EnableAutoConfiguration * public class MyApplication { * - * // ... Bean definitions + * // ... Bean definitions * - * public static void main(String[] args) throws Exception { - * SpringApplication.run(MyApplication.class, args); + * public static void main(String[] args) throws Exception { + * SpringApplication.run(MyApplication.class, args); + * } * } * *