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

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

Introduction

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

Prototype

public void setPlaceholderSuffix(String placeholderSuffix) 

Source Link

Document

Set the suffix that a placeholder string ends with.

Usage

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;
}

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;
}