Package org.springframework.core.io

Examples of org.springframework.core.io.FileSystemResource


    public String toString() {
        return "Name: " + name + "\nAge: " + age;
    }

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

        SimpleBeanWithInterface simpleBean1 = getBean("simpleBean1", factory);
        SimpleBeanWithInterface simpleBean2 = getBean("simpleBean2", factory);
        SimpleBeanWithInterface simpleBean3 = getBean("simpleBean3", factory);
View Full Code Here


* @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");

View Full Code Here

        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

        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()");
View Full Code Here

    private String textToSearch;

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

        CustomEditorConfigurer config = (CustomEditorConfigurer) factory
                .getBean("customEditorConfigurer");

        config.postProcessBeanFactory(factory);
View Full Code Here

* @author robh
*/
public class MethodReplacementExample {

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

        ReplacementTarget replacementTarget = (ReplacementTarget) factory
                .getBean("replacementTarget");
        ReplacementTarget standardTarget = (ReplacementTarget) factory
View Full Code Here

* @author robh
*/
public class AccessingFactoryBeans {

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

        MessageDigest digest = (MessageDigest) factory
                .getBean("shaDigest");
      
View Full Code Here

    public String toString() {
        return "Name: " + name + "\nAge: " + age;
    }

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

        SimpleBean simpleBean1 = getBean("simpleBean1", factory);       
        SimpleBean simpleBean2 = getBean("simpleBean2", factory);
        SimpleBean simpleBean3 = getBean("simpleBean3", factory);
View Full Code Here

    helper.setText("<html><head></head><body><h1>Hello World!</h1>"
        + "<img src=\"cid:abc\"></body></html>", true);

    // add the image
    FileSystemResource img = new FileSystemResource(new File(
        "./ch15/src/images/apress.gif"));
    helper.addInline("abc", img);

    sender.send(msg);
  }
View Full Code Here

* @author robh
*/
public class MessageDigestExample {

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

        MessageDigester digester = (MessageDigester) factory
                .getBean("digester");
        digester.digest("Hello World!");
View Full Code Here

TOP

Related Classes of org.springframework.core.io.FileSystemResource

Copyright © 2018 www.massapicom. 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.