Package org.springframework.beans.factory.config

Examples of org.springframework.beans.factory.config.PropertiesFactoryBean.afterPropertiesSet()


  @Override
  public YarnEnvironmentConfigurer propertiesLocationId(String id, String[] locations) throws IOException {
    for (String location : locations) {
      PropertiesFactoryBean fb = new PropertiesFactoryBean();
      fb.setLocation(new ClassPathResource(location));
      fb.afterPropertiesSet();
      getDataHolder(id).properties.putAll(fb.getObject());
    }
    return this;
  }
View Full Code Here


    @Bean(name="props")
    public Properties getProperties() throws IOException {
      PropertiesFactoryBean fb = new PropertiesFactoryBean();
      fb.setLocation(new ClassPathResource("props.properties"));
      fb.afterPropertiesSet();
      return fb.getObject();
    }

    @Override
    public void configure(YarnEnvironmentConfigurer environment) throws Exception {
View Full Code Here

    @Bean(name="props")
    public Properties getProperties() throws IOException {
      PropertiesFactoryBean fb = new PropertiesFactoryBean();
      fb.setLocation(new ClassPathResource("props.properties"));
      fb.afterPropertiesSet();
      return fb.getObject();
    }

    @Override
    public void configure(YarnEnvironmentConfigurer environment) throws Exception {
View Full Code Here

    @Bean(name="props")
    public Properties getProperties() throws IOException {
      PropertiesFactoryBean fb = new PropertiesFactoryBean();
      fb.setLocation(new ClassPathResource("props.properties"));
      fb.afterPropertiesSet();
      return fb.getObject();
    }

    @Override
    public void configure(YarnEnvironmentConfigurer environment) throws Exception {
View Full Code Here

    @Bean(name="props")
    public Properties getProperties() throws IOException {
      PropertiesFactoryBean fb = new PropertiesFactoryBean();
      fb.setLocation(new ClassPathResource("props.properties"));
      fb.afterPropertiesSet();
      return fb.getObject();
    }

    @Override
    public void configure(YarnEnvironmentConfigurer environment) throws Exception {
View Full Code Here

    private NamedQueries namedQueries() throws IOException {

      PropertiesFactoryBean factory = new PropertiesFactoryBean();
      factory.setLocation(new ClassPathResource("META-INF/jpa-named-queries.properties"));
      factory.afterPropertiesSet();

      return new PropertiesBasedNamedQueries(factory.getObject());
    }
  }
View Full Code Here

    try {

      PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
      propertiesFactoryBean.setLocation(new ClassPathResource("rest-default-messages.properties"));
      propertiesFactoryBean.afterPropertiesSet();

      ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
      messageSource.setBasename("classpath:rest-messages");
      messageSource.setCommonMessages(propertiesFactoryBean.getObject());
View Full Code Here

  private Properties loadProperties() throws Exception {
    if (StringUtils.hasText(propertiesLocation)) {
      PropertiesFactoryBean propsFactory = new PropertiesFactoryBean();
      propsFactory.setLocations(resourceResolver.getResources(propertiesLocation));
      propsFactory.afterPropertiesSet();
      return propsFactory.getObject();
    }

    return null;
  }
View Full Code Here

    RestTemplate template = new RestTemplate();

    PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
    propertiesFactoryBean.setLocation(new ClassPathResource("/org/springframework/batch/admin/web/manager/json-resources.properties"));
    propertiesFactoryBean.afterPropertiesSet();
    Properties properties = propertiesFactoryBean.getObject();

    for (String path : properties.stringPropertyNames()) {
      if (!StringUtils.hasText(path) || !path.startsWith("GET")) {
        continue;
View Full Code Here

  private Properties loadProperties() throws Exception {
    if (StringUtils.hasText(propertiesLocation)) {
      PropertiesFactoryBean propsFactory = new PropertiesFactoryBean();
      propsFactory.setLocations(resourceResolver.getResources(propertiesLocation));
      propsFactory.afterPropertiesSet();
      return propsFactory.getObject();
    }

    return null;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.