Example usage for org.springframework.beans.factory.config PropertyPlaceholderConfigurer setSystemPropertiesModeName

List of usage examples for org.springframework.beans.factory.config PropertyPlaceholderConfigurer setSystemPropertiesModeName

Introduction

In this page you can find the example usage for org.springframework.beans.factory.config PropertyPlaceholderConfigurer setSystemPropertiesModeName.

Prototype

public void setSystemPropertiesModeName(String constantName) throws IllegalArgumentException 

Source Link

Document

Set the system property mode by the name of the corresponding constant, e.g.

Usage

From source file:com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.TestListWrapper.java

protected void setUp() throws Exception {
    loadJdbcProps();/*  www .  j a v  a 2 s . c om*/

    ClassPathResource resource = new ClassPathResource("viewService.xml");
    XmlBeanFactory factory = new XmlBeanFactory(resource);

    PropertyPlaceholderConfigurer cfg = new PropertyPlaceholderConfigurer();
    cfg.setSystemPropertiesModeName("SYSTEM_PROPERTIES_MODE_OVERRIDE");
    cfg.setProperties(jdbcProps);
    cfg.postProcessBeanFactory(factory);

    repo = (RepositoryService) factory.getBean("repoService");
}