Examples of XmlBeanFactory


Examples of org.springframework.beans.factory.xml.XmlBeanFactory

* @author robh
*/
public class LookupDemo {

    public static void main(String[] args) {
        BeanFactory factory = new XmlBeanFactory(new FileSystemResource(
                "./ch5/src/conf/mi/lookup.xml"));

        DemoBean abstractBean = (DemoBean) factory.getBean("abstractLookupBean");
        DemoBean standardBean = (DemoBean) factory.getBean("standardLookupBean");

        displayInfo(standardBean);
        displayInfo(abstractBean);

    }
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanFactory

        System.out.println("Adding " + bytes.length + " bytes");
        this.bytes = bytes;
    }

    public static void main(String[] args) {
        BeanFactory factory = new XmlBeanFactory(new FileSystemResource(
                "./ch5/src/conf/pe/builtin.xml"));
        PropertyEditorBean bean = (PropertyEditorBean) factory
                .getBean("builtInSample");
    }
View Full Code Here

Examples of org.springframework.beans.factory.xml.XmlBeanFactory

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public static void main(String[] args) throws Exception {
        ConfigurableListableBeanFactory factory = new XmlBeanFactory(
                new FileSystemResource(
                        "./ch5/src/conf/lifecycle/disposeInterface.xml"));

        DestructiveBeanWithInterface bean = (DestructiveBeanWithInterface) factory.getBean("destructiveBean");

        System.out.println("Calling destroySingletons()");
        factory.destroySingletons();
        System.out.println("Called destroySingletons()");

    }
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.