Q:

how to inject Environment on application context

I'm currently working with legacy code and I wanna read some properties from the Environment. I know this would be easily done using spring boot with:
@Autowired
Environment environment;

But, since I'm wiring all the components using an application-context.xml file, I don't know how to wire the Environment there,
<bean name="myBean" class="com.acme.MyClass">
???
</bean>

A:

Thanks for your help @volveira89 @rmlan 
Using the xml file, this is working:
<bean name="myBean" class="com.acme.MyClass">
   <constructor-arg ref="environment"/>
</bean>

