Package org.springframework.config.java.annotation

Examples of org.springframework.config.java.annotation.Bean.allowOverriding()


            // If the bean already exists in the factory, don't emit
            // a bean definition. This may or may not be legal,
            // depending on whether the @Bean annotation allows
            // overriding
            if (owningBeanFactory.containsLocalBean(beanName)) {
              if (!beanAnnotation.allowOverriding()) {
                String message = format(
                    "A bean named '%s' already exists. Consider using @Bean(allowOverriding=true)",
                    beanName);
                throw new IllegalStateException(message);
              }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.