From 44e8cdcd8935e5700edef4e9f7620324567e3c14 Mon Sep 17 00:00:00 2001 From: Sebastien Deleuze Date: Wed, 30 Aug 2017 17:28:03 +0200 Subject: [PATCH] Polishing Issue: SPR-15659 --- src/docs/asciidoc/kotlin.adoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/docs/asciidoc/kotlin.adoc b/src/docs/asciidoc/kotlin.adoc index bd703cad59d..8ad7564cfc9 100644 --- a/src/docs/asciidoc/kotlin.adoc +++ b/src/docs/asciidoc/kotlin.adoc @@ -256,9 +256,10 @@ This `beans()` function can then be used to register beans on your application c [source,kotlin] ---- -val context = GenericApplicationContext() -beans().invoke(context) -context.refresh() +val context = GenericApplicationContext().apply { + beans().invoke(this) + refresh() +} ---- [NOTE]