Can I define ApplicationContext as constructor-arg in Spring XML configuration?

If I need access to ApplicationContextthe constructor of my bean class, can I configure the bean in XML and not on the implementation ApplicationContextAware?

Note. I know I can do this using annotated configuration and constructor labeling @Autowire. I am particularly interested in whether this is possible with an XML configuration.

+4
source share

All Articles