Package org.springframework.context.support

Examples of org.springframework.context.support.PropertySourcesPlaceholderConfigurer


      return bean;
    }

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


    int port = SocketUtils.findAvailableTcpPort();

    @Bean
    public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() throws BindException {
      PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer();
      MutablePropertySources ps = new MutablePropertySources();
      ps.addFirst(optionsMetadataPropertySource());
      pspc.setPropertySources(ps);
      return pspc;
    }
View Full Code Here

  @Configuration
  @Import(ModuleConfiguration.class)
  static class TestConfiguration {
    @Bean
    public static PropertySourcesPlaceholderConfigurer placeHolderConfigurer() {
      PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new
          PropertySourcesPlaceholderConfigurer();
      return propertySourcesPlaceholderConfigurer;
    }
View Full Code Here

        return messageSource;
    }

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

    // beans

    @Bean
    public static PropertySourcesPlaceholderConfigurer properties() {
        final PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer();
        return pspc;
    }
View Full Code Here

      ((DisposableBean) this.validator).destroy();
    }
  }

  private PropertySources deducePropertySources() {
    PropertySourcesPlaceholderConfigurer configurer = getSinglePropertySourcesPlaceholderConfigurer();
    if (configurer != null) {
      // Flatten the sources into a single list so they can be iterated
      return new FlatPropertySources(configurer.getAppliedPropertySources());
    }

    if (this.environment instanceof ConfigurableEnvironment) {
      MutablePropertySources propertySources = ((ConfigurableEnvironment) this.environment)
          .getPropertySources();
View Full Code Here

      return factory;
    }

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

  @EnableConfigurationProperties(Wrapper.class)
  public static class TestConfig {

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

    MutablePropertyValues pv = new MutablePropertyValues();
    pv.add("port", "${port}");
    bd.setPropertyValues(pv);
    this.context.registerBeanDefinition("embeddedServletContainerFactory", bd);

    PropertySourcesPlaceholderConfigurer propertySupport = new PropertySourcesPlaceholderConfigurer();
    Properties properties = new Properties();
    properties.put("port", 8080);
    propertySupport.setProperties(properties);
    this.context.registerBeanDefinition("propertySupport",
        beanDefinition(propertySupport));

    this.context.refresh();
    assertThat(getEmbeddedServletContainerFactory().getContainer().getPort(),
View Full Code Here

  @EnableConfigurationProperties(Wrapper.class)
  public static class TestConfig {

    @Bean
    public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
      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.