How well does Spring support following the official Kotlin coding convention for directory structure? Does package scanning still work correctly using a pure Kotlin directory/package structure?
n
nfrankel
09/24/2021, 6:11 AM
1. thanks for pointing me to that document, i didn’t know about this convention
2. it’s all bytecode in the end, hence it should behave similarly, though as per #1, i never tried
k
Klitos Kyriacou
09/24/2021, 10:08 AM
I agree with Nicolas. To clarify, in Kotlin (unlike Java) the directory structure of class files does not depend on the directory structure of source files. And since Spring only looks at class files, it shouldn't matter where you place your source files.
h
hho
09/24/2021, 10:14 AM
But it's not only about class files, for example properties (language bundles etc.) might be also loaded from the classpath?
I haven't tried it though, because almost no tools support the Kotlin structure anyways (I'm a Maven user).