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 a static method - companion object translates to a nested static final class Companion + related static final Companion Companion field. - companion object + @JvmStatic translates to a duplicated bean error since the BeanPostProcessor 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.