Package org.constretto.spring

Examples of org.constretto.spring.ConfigurationAnnotationConfigurer


public class EnvironmentAnnotatedFieldTest {

    @Test
    public void givenClassWithEnvironmentAnnotatedPropertyThenInjectEnvironment() throws Exception {
        TestClazz testClazz = new TestClazz();
        ConfigurationAnnotationConfigurer annotationConfigurer = new ConfigurationAnnotationConfigurer(
                new DefaultConstrettoConfiguration(null), new AlwaysDevelopmentEnvironmentResolver());
        annotationConfigurer.postProcessAfterInstantiation(testClazz, "testBean");
        Assert.assertTrue(testClazz.getEnvironments().contains("development"));
    }
View Full Code Here


            return new ConstrettoBuilder(true).getConfiguration();
        }

        @Bean
        public static ConfigurationAnnotationConfigurer configurationAnnotationConfigurer(final ConstrettoConfiguration configuration) {
            return new ConfigurationAnnotationConfigurer(configuration, new DefaultAssemblyContextResolver());
        }
View Full Code Here

        return new ConstrettoPropertyPlaceholderConfigurer(constrettoConfiguration());
    }

    @Bean
    public ConfigurationAnnotationConfigurer configurationAnnotationConfigurer() {
        return new ConfigurationAnnotationConfigurer(constrettoConfiguration(),
                                                     new DefaultAssemblyContextResolver());
    }
View Full Code Here

TOP

Related Classes of org.constretto.spring.ConfigurationAnnotationConfigurer

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.