From 71a117c0fdae0a2db3942b672f281f210961971b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Tue, 19 Mar 2024 11:03:56 +0100 Subject: [PATCH] Document AOT limitations related to Kotlin backticks Closes gh-32487 --- framework-docs/modules/ROOT/pages/core/aot.adoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/framework-docs/modules/ROOT/pages/core/aot.adoc b/framework-docs/modules/ROOT/pages/core/aot.adoc index e7bb5392081b..a07ea864dba8 100644 --- a/framework-docs/modules/ROOT/pages/core/aot.adoc +++ b/framework-docs/modules/ROOT/pages/core/aot.adoc @@ -152,8 +152,23 @@ Java:: } ---- + +Kotlin:: ++ +[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"] +---- + @Configuration(proxyBeanMethods = false) + class DataSourceConfiguration { + + @Bean + fun dataSource() = SimpleDataSource() + + } +---- ====== +WARNING: Kotlin class names with backticks using invalid Java identifiers (not starting by a letter, containing spaces, etc.) are not supported. + Since there isn't any particular condition on this class, `dataSourceConfiguration` and `dataSource` are identified as candidates. The AOT engine will convert the configuration class above to code similar to the following: