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

The following examples show how to use org.springframework.context.support.PropertySourcesPlaceholderConfigurer#setLocation() . 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: 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 2
Source File: ApplicationPropertiesConfiguration.java    From alf.io with GNU General Public License v3.0 5 votes vote down vote up
@Bean
@Profile("!"+Initializer.PROFILE_SPRING_BOOT)
public static PropertySourcesPlaceholderConfigurer propertyPlaceholder() {
    PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer();
    configurer.setLocation(new ClassPathResource("application.properties"));
    return configurer;
}
 
Example 3
Source File: CommitIdApplication.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {
    PropertySourcesPlaceholderConfigurer c = new PropertySourcesPlaceholderConfigurer();
    c.setLocation(new ClassPathResource("git.properties"));
    c.setIgnoreResourceNotFound(true);
    c.setIgnoreUnresolvablePlaceholders(true);
    return c;
}
 
Example 4
Source File: ExternalPropertyConfigurer.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
    PropertySourcesPlaceholderConfigurer properties = new PropertySourcesPlaceholderConfigurer();
    properties.setLocation(new FileSystemResource("src/main/resources/external/conf.properties"));
    properties.setIgnoreResourceNotFound(false);
    return properties;
}
 
Example 5
Source File: NextRTCConfig.java    From nextrtc-signaling-server with MIT License 4 votes vote down vote up
@Bean
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
    PropertySourcesPlaceholderConfigurer propertyPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
    propertyPlaceholderConfigurer.setLocation(new ClassPathResource("nextrtc.properties"));
    return propertyPlaceholderConfigurer;
}