Polish Kotlin code snippet in reference docs

This commit is contained in:
Brian Clozel
2020-11-17 15:21:10 +01:00
parent b29723623b
commit de0b5bc5a1

View File

@@ -11064,13 +11064,13 @@ Here is an example of instrumentation in the `AnnotationConfigApplicationContext
.Kotlin
----
// create a startup step and start recording
val scanPackages = this.getApplicationStartup().start("spring.context.base-packages.scan");
val scanPackages = this.getApplicationStartup().start("spring.context.base-packages.scan")
// add tagging information to the current step
scanPackages.tag("packages", () -> Arrays.toString(basePackages));
scanPackages.tag("packages", () -> Arrays.toString(basePackages))
// perform the actual phase we're instrumenting
this.scanner.scan(basePackages);
this.scanner.scan(basePackages)
// end the current step
scanPackages.end();
scanPackages.end()
----
The application context is already instrumented with multiple steps.