Examples of ConfigObject


Examples of groovy.util.ConfigObject

        String src = "Chinese text: \u3421\u3437\u343f\u3443\u3410\u3405\u38b3\u389a\u395e\u3947\u3adb\u3b5a\u3b67";
        // Sanity check the string loaded OK as unicode - it won't look right if you output it, default stdout is not UTF-8
        // on many OSes
        assertEquals(src.indexOf('?'), -1);

        ConfigObject config = new ConfigSlurper().parse("grails.views.gsp.encoding = \"UTF-8\"");

        buildMockRequest(config);
        ParsedResult output = null;
        try {
            output = parseCode("myTest4", src);
View Full Code Here

Examples of groovy.util.ConfigObject

    public void contextInitialized(ServletContextEvent event) {
        try {
            ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
            Object grailsApplication = createGrailsApplication(contextClassLoader);
            ConfigObject co = getConfig(grailsApplication);
            Log4jConfig.initialize(co);
        }
        catch (Throwable e) {
            LogLog.error("Error initializing log4j: " + e.getMessage(), e);
        }
View Full Code Here

Examples of groovy.util.ConfigObject

        assertEquals("/layouts/application.gsp", d.getPage());
        assertEquals("application", d.getName());
    }

    public void testOverridingDefaultTemplateViaConfig() throws Exception {
            ConfigObject config = new ConfigSlurper().parse("grails.sitemesh.default.layout='otherApplication'");
            MutablePropertySources propertySources = new MutablePropertySources();
            propertySources.addLast(new MapPropertySource("grails", config));

            GrailsWebRequest webRequest = buildMockRequest(new PropertySourcesConfig(propertySources));
            webRequest.setAttribute(GrailsLayoutDecoratorMapper.RENDERING_VIEW, Boolean.TRUE, RequestAttributes.SCOPE_REQUEST);
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.