From: Juergen H. <jho...@us...> - 2008-03-31 15:22:50
|
Update of /cvsroot/springframework/spring/tiger/src/org/springframework/context/annotation In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24483/tiger/src/org/springframework/context/annotation Modified Files: AnnotationConfigUtils.java Log Message: AutowiredAnnotationBeanPostProcessor marks @Autowired bean properties as processed (for @Required to accept them) Index: AnnotationConfigUtils.java =================================================================== RCS file: /cvsroot/springframework/spring/tiger/src/org/springframework/context/annotation/AnnotationConfigUtils.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AnnotationConfigUtils.java 30 Dec 2007 23:10:53 -0000 1.7 --- AnnotationConfigUtils.java 31 Mar 2008 15:22:14 -0000 1.8 *************** *** 1,4 **** /* ! * Copyright 2002-2007 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); --- 1,4 ---- /* ! * Copyright 2002-2008 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); *************** *** 37,58 **** * @author Juergen Hoeller * @since 2.5 - * @see org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor - * @see org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor * @see CommonAnnotationBeanPostProcessor * @see org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor */ public class AnnotationConfigUtils { /** ! * The bean name of the internally managed Required annotation processor. ! */ ! public static final String REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME = ! "org.springframework.context.annotation.internalRequiredAnnotationProcessor"; ! ! /** ! * The bean name of the internally managed Autowired annotation processor. */ ! public static final String AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME = ! "org.springframework.context.annotation.internalAutowiredAnnotationProcessor"; /** --- 37,52 ---- * @author Juergen Hoeller * @since 2.5 * @see CommonAnnotationBeanPostProcessor * @see org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor + * @see org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor + * @see org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor */ public class AnnotationConfigUtils { /** ! * The bean name of the internally managed JPA annotation processor. */ ! public static final String PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME = ! "org.springframework.context.annotation.internalPersistenceAnnotationProcessor"; /** *************** *** 63,70 **** /** ! * The bean name of the internally managed JPA annotation processor. */ ! public static final String PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME = ! "org.springframework.context.annotation.internalPersistenceAnnotationProcessor"; --- 57,70 ---- /** ! * The bean name of the internally managed Autowired annotation processor. */ ! public static final String AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME = ! "org.springframework.context.annotation.internalAutowiredAnnotationProcessor"; ! ! /** ! * The bean name of the internally managed Required annotation processor. ! */ ! public static final String REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME = ! "org.springframework.context.annotation.internalRequiredAnnotationProcessor"; *************** *** 102,117 **** Set<BeanDefinitionHolder> beanDefinitions = new LinkedHashSet<BeanDefinitionHolder>(4); ! if (!registry.containsBeanDefinition(REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME)) { ! RootBeanDefinition def = new RootBeanDefinition(RequiredAnnotationBeanPostProcessor.class); ! def.setSource(source); ! def.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); ! beanDefinitions.add(registerBeanPostProcessor(registry, def, REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME)); ! } ! ! if (!registry.containsBeanDefinition(AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME)) { ! RootBeanDefinition def = new RootBeanDefinition(AutowiredAnnotationBeanPostProcessor.class); def.setSource(source); def.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); ! beanDefinitions.add(registerBeanPostProcessor(registry, def, AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME)); } --- 102,112 ---- Set<BeanDefinitionHolder> beanDefinitions = new LinkedHashSet<BeanDefinitionHolder>(4); ! // Check for JPA support, and if present add the PersistenceAnnotationBeanPostProcessor. ! if (jpaPresent && !registry.containsBeanDefinition(PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME)) { ! RootBeanDefinition def = new RootBeanDefinition(); ! def.setBeanClassName(PERSISTENCE_ANNOTATION_PROCESSOR_CLASS_NAME); def.setSource(source); def.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); ! beanDefinitions.add(registerBeanPostProcessor(registry, def, PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME)); } *************** *** 124,134 **** } ! // Check for JPA support, and if present add the PersistenceAnnotationBeanPostProcessor. ! if (jpaPresent && !registry.containsBeanDefinition(PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME)) { ! RootBeanDefinition def = new RootBeanDefinition(); ! def.setBeanClassName(PERSISTENCE_ANNOTATION_PROCESSOR_CLASS_NAME); def.setSource(source); def.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); ! beanDefinitions.add(registerBeanPostProcessor(registry, def, PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME)); } --- 119,134 ---- } ! if (!registry.containsBeanDefinition(AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME)) { ! RootBeanDefinition def = new RootBeanDefinition(AutowiredAnnotationBeanPostProcessor.class); def.setSource(source); def.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); ! beanDefinitions.add(registerBeanPostProcessor(registry, def, AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME)); ! } ! ! if (!registry.containsBeanDefinition(REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME)) { ! RootBeanDefinition def = new RootBeanDefinition(RequiredAnnotationBeanPostProcessor.class); ! def.setSource(source); ! def.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); ! beanDefinitions.add(registerBeanPostProcessor(registry, def, REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME)); } |