Example usage for org.springframework.web.context.support XmlWebApplicationContext setAllowBeanDefinitionOverriding

List of usage examples for org.springframework.web.context.support XmlWebApplicationContext setAllowBeanDefinitionOverriding

Introduction

In this page you can find the example usage for org.springframework.web.context.support XmlWebApplicationContext setAllowBeanDefinitionOverriding.

Prototype

public void setAllowBeanDefinitionOverriding(boolean allowBeanDefinitionOverriding) 

Source Link

Document

Set whether it should be allowed to override bean definitions by registering a different definition with the same name, automatically replacing the former.

Usage

From source file:com.scf.web.context.spring.SpringApplicationContextInitializer.java

@Override
public void initialize(XmlWebApplicationContext applicationContext) {
    applicationContext.setAllowBeanDefinitionOverriding(false);
}