org.springframework.context.support.PropertySourcesPlaceholderConfigurer#setLocation ( )源码实例Demo

下面列出了org.springframework.context.support.PropertySourcesPlaceholderConfigurer#setLocation ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: jwala   文件: AemServiceConfiguration.java
/**
 * 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;
}
 
@Bean
@Profile("!"+Initializer.PROFILE_SPRING_BOOT)
public static PropertySourcesPlaceholderConfigurer propertyPlaceholder() {
    PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer();
    configurer.setLocation(new ClassPathResource("application.properties"));
    return configurer;
}
 
源代码3 项目: tutorials   文件: CommitIdApplication.java
@Bean
public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {
    PropertySourcesPlaceholderConfigurer c = new PropertySourcesPlaceholderConfigurer();
    c.setLocation(new ClassPathResource("git.properties"));
    c.setIgnoreResourceNotFound(true);
    c.setIgnoreUnresolvablePlaceholders(true);
    return c;
}
 
源代码4 项目: tutorials   文件: ExternalPropertyConfigurer.java
@Bean
public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
    PropertySourcesPlaceholderConfigurer properties = new PropertySourcesPlaceholderConfigurer();
    properties.setLocation(new FileSystemResource("src/main/resources/external/conf.properties"));
    properties.setIgnoreResourceNotFound(false);
    return properties;
}
 
源代码5 项目: nextrtc-signaling-server   文件: NextRTCConfig.java
@Bean
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
    PropertySourcesPlaceholderConfigurer propertyPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
    propertyPlaceholderConfigurer.setLocation(new ClassPathResource("nextrtc.properties"));
    return propertyPlaceholderConfigurer;
}