Hi fellow kotlin devs, does anyone of you know if ...
# announcements
d
Hi fellow kotlin devs, does anyone of you know if its possible to put class level annotations on a global function? Do I miss something or is it simply not possible?
a
Why do you want to put a class-level annotation onto a function?
d
I'm using spring and want to create a logger
Copy code
@Bean
@Scope(SCOPE_PROTOTYPE)
fun logger(injectionPoint: InjectionPoint): KLogger =
    KotlinLogging.logger(injectionPoint.methodParameter!!.containingClass.canonicalName)
Basically there is no real need for a class here other than having a
Copy code
@Configuration
annotation, otherwise no bean will be created.