Package org.springframework.beans.factory.config

Examples of org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver


                    } else {
                        setValue(new Long(Long.parseLong(text, 10)));
                    }
                }
            });
            PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
            ppc.setProperties(_properties);
            ppc.postProcessBeanFactory(f);
            f.registerSingleton("serverManagementService", getServerManagementService());
            WOJServer s = (WOJServer)f.getBean("wojServer", WOJServer.class);
            return s;
        } catch (Exception ex) {
            LOGGER.error("impossible to configure server "+mode, ex);
View Full Code Here


     * @return
     */
    private synchronized ServerManagementService getServerManagementService() {
        if (_srvManagement == null) {
            XmlBeanFactory f = new XmlBeanFactory(new ClassPathResource("config/spring-config-server-management.xml", WOJServerFactory.class));
            PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
            ppc.setProperties(_properties);
            ppc.postProcessBeanFactory(f);
            _srvManagement = (ServerManagementService)f.getBean("serverManagementService", ServerManagementService.class);
        }
        return _srvManagement;
    }
View Full Code Here

            baseDir = System.getProperty("user.dir");
        }
        final String appRoot = baseDir+"/../../src/webapp";
        final ApplicationContext bootContext = new ClassPathXmlApplicationContext(bootConfigurations, true);
        ctx = new ClassPathXmlApplicationContext(configurations, false, bootContext);
        PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
        Properties p = TestPortletApplicationManager.setTestProperties(baseDir, new Properties());
        p.setProperty("supported.portletmode.autoswitch.config", "false");
        p.setProperty("supported.portletmode.autoswitch.edit_defaults", "false");
        p.setProperty("supported.portletmode.autoswitch.config.surrogate.portlet", "j2-admin::CustomConfigModePortlet");
        p.setProperty(JetspeedEngineConstants.APPLICATION_ROOT_KEY, appRoot);
        ppc.setProperties(p);
        ctx.addBeanFactoryPostProcessor(ppc);
        ctx.refresh();

        // access portal application manager
        portletApplicationManager = (PortletApplicationManagement)ctx.getBean("PAM");
View Full Code Here

        this.runtimeProperties = runtimeProperties;

        try {
            // Prepare parent application context
            PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
            ppc.setProperties(runtimeProperties);

            // Preconfigured beans are installed into parent bean factory
            DefaultListableBeanFactory parentBeanFactory = new DefaultListableBeanFactory();
            parentBeanFactory.registerSingleton("runtime-properties", runtimeProperties);
            GenericApplicationContext parentContext = new GenericApplicationContext(
View Full Code Here

@Component
class RegisterProperties {
    @Bean
    PropertyPlaceholderConfigurer register() {
        PropertyPlaceholderConfigurer configurer = new PropertyPlaceholderConfigurer();
        configurer.setProperties(Application.LunceneIndexer.props);
        return configurer;
    }
View Full Code Here

    private Properties properties;

    @Bean
    PropertyPlaceholderConfigurer propsLoader() throws Exception {
        copyXmlAndInitializeProps();
        PropertyPlaceholderConfigurer configurer = new PropertyPlaceholderConfigurer();
        configurer.setProperties(properties);
        return configurer;
    }
View Full Code Here

   
    public SpringComponentManager(String[] bootConfigs, String[] appConfigs, String appRoot)
    {       
        File appRootDir = new File(appRoot);
        PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
        Properties p = new Properties();
        //p.setProperty(APPLICATION_ROOT_KEY,appRootDir.getAbsolutePath());
        ppc.setProperties(p);
       
        if (bootConfigs != null && bootConfigs.length > 0)
        {
            bootCtx = new FileSystemXmlApplicationContext(bootConfigs, false);
            bootCtx.addBeanFactoryPostProcessor(ppc);
View Full Code Here

        if (includeService) {
            readBeans(new ClassPathResource("server-lifecycle-beans.xml", getClass()));
        }
       
        // bring in some property values from a Properties file
        PropertyPlaceholderConfigurer cfg = new PropertyPlaceholderConfigurer();
        Properties properties = new Properties();
        properties.setProperty("staticResourceURL", getStaticResourceURL());
        cfg.setProperties(properties);
        // now actually do the replacement
        cfg.postProcessBeanFactory(applicationContext.getBeanFactory());       
        applicationContext.refresh();
    }
View Full Code Here

    }

   
    public SpringComponentManager(String[] bootConfigs, String[] appConfigs, String appRoot)
    {       
        PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
        Properties p = new Properties();
        //p.setProperty(APPLICATION_ROOT_KEY,appRootDir.getAbsolutePath());
        ppc.setProperties(p);
       
        if (bootConfigs != null && bootConfigs.length > 0)
        {
            bootCtx = new FileSystemXmlApplicationContext(bootConfigs, false);
            bootCtx.addBeanFactoryPostProcessor(ppc);
View Full Code Here

            }
            else
            {
                ctx = new ClassPathXmlApplicationContext(getConfigurations(), false);
            }
            PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
            Properties p = getPostProcessProperties();
            p.setProperty(JetspeedEngineConstants.APPLICATION_ROOT_KEY, "../../src/webapp");
            ppc.setProperties(p);
            ctx.addBeanFactoryPostProcessor(ppc);
            ctx.refresh();
        }
    }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver

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.