Package org.springframework.context.support

Examples of org.springframework.context.support.PropertySourcesPlaceholderConfigurer


      return this.value;
    }

    @Bean
    public static PropertySourcesPlaceholderConfigurer configurer() {
      return new PropertySourcesPlaceholderConfigurer();
    }
View Full Code Here


  @Configuration
  protected static class Config {

    @Bean
    public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
      return new PropertySourcesPlaceholderConfigurer();
    }
View Full Code Here

public class PropertyPlaceholderAutoConfiguration {

  @Bean
  @ConditionalOnMissingBean(search = SearchStrategy.CURRENT)
  public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
    return new PropertySourcesPlaceholderConfigurer();
  }
View Full Code Here

  @Configuration
  static class PlaceholdersOverride {

    @Bean
    public static PropertySourcesPlaceholderConfigurer morePlaceholders() {
      PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer();
      configurer.setProperties(StringUtils.splitArrayElementsIntoProperties(
          new String[] { "foo=spam" }, "="));
      configurer.setLocalOverride(true);
      configurer.setOrder(0);
      return configurer;
    }
View Full Code Here

     * Allow us to use .properties files
     * @throws java.io.IOException
     */
    @Bean
    public static PropertySourcesPlaceholderConfigurer propertyConfigurer() throws IOException {
        PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer();

        Resource[] locations = {
                new ClassPathResource("test.properties")
        };
        configurer.setLocations(locations);
        configurer.setIgnoreResourceNotFound(true);

        return configurer;
    }
View Full Code Here

    return new JdbcTemplate(dataSource());
  }

  @Bean
  public PropertySourcesPlaceholderConfigurer propertyPlaceHolderConfigurer() {
    return new PropertySourcesPlaceholderConfigurer();
  }
View Full Code Here

@ImportResource("/WEB-INF/spring-servlet.xml")
//@Import(SecurityConfig.class)
public class WebMvcConfig extends WebMvcConfigurerAdapter {
    @Bean
    public PropertySourcesPlaceholderConfigurer myPropertySourcesPlaceholderConfigurer() {
        PropertySourcesPlaceholderConfigurer p = new PropertySourcesPlaceholderConfigurer();
        p.setLocation(new ClassPathResource("sparklr.properties"));
        return p;
    }
View Full Code Here

  @Autowired
  private Environment env;
  @Bean
    public static PropertySourcesPlaceholderConfigurer placeHolderConfigurer()
    {
        return new PropertySourcesPlaceholderConfigurer();
    }
View Full Code Here

      if (propertySource != null) {
        mutablePropertySources.addLast(propertySource);
      }
    }
    // Enable @Value
    PropertySourcesPlaceholderConfigurer placeholderConfigurer =
        new PropertySourcesPlaceholderConfigurer();
    placeholderConfigurer.setEnvironment(env);
    context.addBeanFactoryPostProcessor(placeholderConfigurer);
    return env;
  }
View Full Code Here

    return new JdbcTemplate(dataSource());
  }

  @Bean
  public PropertySourcesPlaceholderConfigurer propertyPlaceHolderConfigurer() {
    return new PropertySourcesPlaceholderConfigurer();
  }
View Full Code Here

TOP

Related Classes of org.springframework.context.support.PropertySourcesPlaceholderConfigurer

Copyright © 2018 www.massapicom. 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.