Merge branch '1.4.x' into 1.5.x

This commit is contained in:
Stephane Nicoll 2017-01-20 10:54:32 +01:00
commit bed545df64
2 changed files with 8 additions and 3 deletions

View File

@ -1220,6 +1220,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 In addition, any `MetricReader` that you define and mark as `@ExportMetricReader` will
have its values exported by the default exporter. 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 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 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 switched off using a flag `spring.metrics.export.send-latest`). Note also that the

View File

@ -96,10 +96,11 @@ import org.springframework.web.context.support.StandardServletEnvironment;
* @EnableAutoConfiguration * @EnableAutoConfiguration
* public class MyApplication { * public class MyApplication {
* *
* // ... Bean definitions * // ... Bean definitions
* *
* public static void main(String[] args) throws Exception { * public static void main(String[] args) throws Exception {
* SpringApplication.run(MyApplication.class, args); * SpringApplication.run(MyApplication.class, args);
* }
* } * }
* </pre> * </pre>
* *