The JavaDoc for @AnnotationDrivenConfig says
However I get the following exception when using this annotation (I need it for @Autowired support)...
Note: Unlike its <context:annotation-config/> XML counterpart, this annotation does not trigger the detection and handling of @Required methods. Due to fundamental differences between how JavaConfig and XML work, this must be enabled via AspectJ. See RequiredMethodInvocationTracker for more details. ...
I'm trying to migrate from XML configuration to Java configuration and I don't want to have to remove the @Required annotation from existing classes.Code:org.springframework.beans.factory.BeanInitializationException: Property 'sessionFactory' is required for bean 'versionInfoProvider' at org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor.postProcessPropertyValues(RequiredAnnotationBeanPostProcessor.java:121) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:998) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) ... 13 more
I do not need the @Required checking for Java configuration.


