Closed
Description
Related to #32929, It looks like there is no proper way yet to declare a BeanPostProcessor
in Kotlin since:
@Bean
on a member function does not translate to astatic
methodcompanion object
translates to a nestedstatic final class Companion
+ relatedstatic final Companion Companion
field.companion object
+@JvmStatic
translates to a duplicated bean error since theBeanPostProcessor
method is exposed both in the `Companion nested class (non static method) and configuration class (static method).
Spring should support the companion object
+ @JvmStatic
use case.