Example usage for org.springframework.context.support PropertySourcesPlaceholderConfigurer setPlaceholderPrefix

List of usage examples for org.springframework.context.support PropertySourcesPlaceholderConfigurer setPlaceholderPrefix

Introduction

In this page you can find the example usage for org.springframework.context.support PropertySourcesPlaceholderConfigurer setPlaceholderPrefix.

Prototype

public void setPlaceholderPrefix(String placeholderPrefix) 

Source Link

Document

Set the prefix that a placeholder string starts with.

Usage

From source file:it.cnr.missioni.connector.core.spring.placeholder.MissioniCorePlaceholderConfig.java

@Bean
public static PropertySourcesPlaceholderConfigurer oauth2CorePropertyConfigurer(
        @Value("#{systemProperties['GP_DATA_DIR']}") String gpConfigDataDir,
        @Value("#{systemProperties['MISSIONI_CORE_FILE_PROP']}") String missioniCoreFileProp)
        throws MalformedURLException {

    PropertySourcesPlaceholderConfigurer corePC = new PropertySourcesPlaceholderConfigurer();
    corePC.setPlaceholderPrefix("missioniCoreConfigurator{");
    corePC.setPlaceholderSuffix("}");
    corePC.setNullValue("@null");

    corePC.setLocations(placeholderResourcesLoader.loadResources(gpConfigDataDir, missioniCoreFileProp));
    corePC.setIgnoreResourceNotFound(Boolean.TRUE);
    corePC.setIgnoreUnresolvablePlaceholders(Boolean.TRUE);

    return corePC;
}

From source file:org.geosdi.geoplatform.experimental.connector.core.spring.placeholder.OAuth2CorePlaceholderConfig.java

@Bean
public static PropertySourcesPlaceholderConfigurer oauth2CorePropertyConfigurer(
        @Value("#{systemProperties['GP_DATA_DIR']}") String gpConfigDataDir,
        @Value("#{systemProperties['OAUTH2_CORE_FILE_PROP']}") String oauth2CoreFileProp)
        throws MalformedURLException {

    PropertySourcesPlaceholderConfigurer corePC = new PropertySourcesPlaceholderConfigurer();
    corePC.setPlaceholderPrefix("oauth2CoreConfigurator{");
    corePC.setPlaceholderSuffix("}");
    corePC.setNullValue("@null");

    corePC.setLocations(placeholderResourcesLoader.loadResources(gpConfigDataDir, oauth2CoreFileProp));
    corePC.setIgnoreResourceNotFound(Boolean.TRUE);
    corePC.setIgnoreUnresolvablePlaceholders(Boolean.TRUE);

    return corePC;
}