Java Code Examples for org.springframework.context.support.PropertySourcesPlaceholderConfigurer#setProperties()

The following examples show how to use org.springframework.context.support.PropertySourcesPlaceholderConfigurer#setProperties() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PropertyResolver.java    From mutual-tls-ssl with Apache License 2.0 5 votes vote down vote up
@Bean
public static PropertySourcesPlaceholderConfigurer properties() {
    PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
    YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean();
    yaml.setResources(new ClassPathResource(CLIENT_PROPERTY_FILE));
    propertySourcesPlaceholderConfigurer.setProperties(Objects.requireNonNull(yaml.getObject()));
    return propertySourcesPlaceholderConfigurer;
}
 
Example 2
Source File: AemServiceConfiguration.java    From jwala with Apache License 2.0 5 votes vote down vote up
/**
 * Make vars.properties available to spring integration configuration
 * System properties are only used if there is no setting in vars.properties.
 */
@Bean(name = "aemServiceConfigurationPropertiesConfigurer")
public static PropertySourcesPlaceholderConfigurer configurer() {
    PropertySourcesPlaceholderConfigurer ppc = new PropertySourcesPlaceholderConfigurer();
    ppc.setLocation(new ClassPathResource("META-INF/spring/jwala-defaults.properties"));
    ppc.setLocalOverride(true);
    ppc.setProperties(ApplicationProperties.getProperties());
    return ppc;
}
 
Example 3
Source File: RestManagementConfiguration.java    From gravitee-management-rest-api with Apache License 2.0 5 votes vote down vote up
@Bean
public static PropertySourcesPlaceholderConfigurer properties(@Qualifier("graviteeProperties") Properties graviteeProperties) {
    PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
    propertySourcesPlaceholderConfigurer.setProperties(graviteeProperties);
    propertySourcesPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders(true);

    return propertySourcesPlaceholderConfigurer;
}
 
Example 4
Source File: RestPortalConfiguration.java    From gravitee-management-rest-api with Apache License 2.0 5 votes vote down vote up
@Bean
public static PropertySourcesPlaceholderConfigurer properties(@Qualifier("graviteeProperties") Properties graviteeProperties) {
    PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
    propertySourcesPlaceholderConfigurer.setProperties(graviteeProperties);
    propertySourcesPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders(true);

    return propertySourcesPlaceholderConfigurer;
}