Package org.springframework.core.env

Examples of org.springframework.core.env.MapPropertySource


    propertySource.put("prop", "app");

    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
    context.register(BeanTest.class);

    propertySources.addFirst(new MapPropertySource("appProperties", propertySource));

    ApplicationContextConfigurer.configure(context, propertySources);
    context.refresh();

    BeanTest bean = context.getBean(BeanTest.class);
View Full Code Here


    testProperties.put("application.ns", getClass().getPackage().getName());

    context.registerBeanDefinition("conversionService", new RootBeanDefinition(
        DefaultConversionService.class));

    propertySources.addFirst(new MapPropertySource("integrationTest", testProperties));

    ApplicationContextConfigurer.configure(context, propertySources);
  }
View Full Code Here

      // startup class
      specialProps.put(APP_STARTUP_CLASS, getClass().getName());

      MutablePropertySources propertySources = new MutablePropertySources();
      propertySources.addFirst(new MapPropertySource(appName, specialProps));
      for (int i = properties.size() - 1; i >= 0; i--) {
        propertySources.addFirst(asPropertySource(properties.get(i)));
      }

      return Pair.of(propertySources, specialProps);
View Full Code Here

TOP

Related Classes of org.springframework.core.env.MapPropertySource

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.