I am using java config to configure spring beans. I noticed that all beans created with @Bean annotation have their beanClass field set to null in BeanDefinition. I looked at the code and beanClass is set only for @Configuration components in ConfigurationClassPostProcessor.
Some BeanfactoryPostProcessor implementations depend on beanClass field to process custom annotations.
How can I get around this?