Package org.springframework.context.support

Examples of org.springframework.context.support.PropertySourcesPlaceholderConfigurer


    private DataSource dataSource;

    // Load environment specific application properties
    @Bean
    public static PropertySourcesPlaceholderConfigurer properties(Environment environment) {
        PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer();
        ClassPathResource[] resources = {
            new ClassPathResource("application_" + environment.getProperty("application.environment") + ".properties")
        };
        pspc.setLocations(resources);
        return pspc;
    }
View Full Code Here


      return mock(RabbitAdmin.class);
    }

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

  @Value("${connection.password}")
  String dbPass;

  @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.