Package com.alibaba.citrus.springext.support.context

Examples of com.alibaba.citrus.springext.support.context.XmlApplicationContext


    private AbstractSerializationEncoder encoder;
    private boolean skipEncoding;

    @BeforeClass
    public static void initFactory() {
        factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, "encoders.xml")));
    }
View Full Code Here


        parentFactory = webCtx;
        factory = webCtx;
    }

    protected static void initSubFactory(String configFile) throws Exception {
        factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, configFile)), parentFactory);
    }
View Full Code Here

    public void init() {
        if (skipValidation) {
            System.setProperty("skipValidation", "true");
        }

        factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, "services-skip-validation.xml")));
        mappingRuleService = (MappingRuleServiceImpl) factory.getBean("mappingRuleService");
        rules = getFieldValue(mappingRuleService, "rules", Map.class);
    }
View Full Code Here

    static {
        TestEnvStatic.init();
    }

    protected static ApplicationContext createFactory(String location) {
        return new XmlApplicationContext(new FileSystemResource(new File(srcdir, location)));
    }
View Full Code Here

        return createBeanFactory(configLocation, null);
    }

    protected final static XmlApplicationContext createBeanFactory(String configLocation, ApplicationContext parent)
            throws Exception {
        return new XmlApplicationContext(new FileSystemResource(new File(srcdir, configLocation)), parent);
    }
View Full Code Here

    private Resource resourceNotExist;
    private ResourceDataSource rds;

    @BeforeClass
    public static void initFactory() {
        factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, "services.xml")));
        factory.setResourceLoadingExtender(new ResourceLoadingSupport(factory));
    }
View Full Code Here

        assertResourceServiceList("/test.txt", "test.txt", true, false);
    }

    @Test
    public void noParent() throws Exception {
        ApplicationContext factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir,
                "loader/super-loader.xml")));

        resourceLoadingService = (ResourceLoadingService) factory.getBean("resourceLoadingService");
        assertResourceServiceList("/no_name/webroot/test.txt", "test.txt", false, false);
        assertResourceServiceList("/with_name/test.txt", "test.txt", false, false);

        resourceLoadingService = (ResourceLoadingService) factory.getBean("sameName");
        assertResourceServiceList("/webroot/test.txt", "test.txt", false, false);

        resourceLoadingService = (ResourceLoadingService) factory.getBean("defaultName");
        assertResourceServiceList("/test.txt", "test.txt", false, false);

        resourceLoadingService = (ResourceLoadingService) factory.getBean("defaultName1");
        assertResourceServiceList("/test.txt", "test.txt", false, false);
    }
View Full Code Here

    /**
     * ����beanFactory��
     */
    protected final static void createBeanFactory(String configLocation) {
        factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, configLocation)));
    }
View Full Code Here

    public void init() {
        if (skipValidation) {
            System.setProperty("skipValidation", "true");
        }

        factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, "services-skip-validation.xml")));
        TemplateService templateService = (TemplateService) factory.getBean("templateService");
        freeMarkerEngine = (FreeMarkerEngineImpl) templateService.getTemplateEngine("ftl");
    }
View Full Code Here

        factory = initFactory("services.xml");
        System.setProperty("user.name", "baobao"); // javamail Service���ȥȡuser.name���˴���ȷ�趨��ֵ��
    }

    protected static final XmlApplicationContext initFactory(String configFile) {
        XmlApplicationContext factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, configFile)));
        factory.setResourceLoadingExtender(new ResourceLoadingSupport(factory));
        return factory;
    }
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.springext.support.context.XmlApplicationContext

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.