Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you run this program now, you will see that the results are exactly the same as in previous version.

Using ConfigureMe within a Spring Projekt

This is quite easy. ConfigureMe has Spring support allready included, just use the org.configureme.spring.ConfigureSpringBeans class and add all SpringBeans that should be configure as constructor argument.
For example when using the default environment:

Code Block
titleapplicationContext.xml
borderStylesolid


        <bean id="pricing" class="Pricing" />

	<bean class="org.configureme.spring.ConfigureSpringBeans">
		<constructor-arg ref="mailService" />
	</bean>

you can also specify the a environment which should be used when adding a DynamicEnvironment as first constructor argument.

Code Block
titleapplicationContext.xml
borderStylesolid


        <bean id="pricing" class="Pricing" />

	<bean class="org.configureme.spring.ConfigureSpringBeans">
                <constructor-arg>
                 <bean class="org.configureme.environments.DynamicEnvironment">
				<constructor-arg value="europe" />
				<constructor-arg value="de" />
			</bean>
                </constructor-arg>
		<constructor-arg ref="mailService" />
	</bean>

Download and try ConfigureMe now: https://configureme.dev.java.net