Doesn't Spring really support Interface injection at all?

Posted by mrCoder on Stack Overflow See other posts from Stack Overflow or by mrCoder
Published on 2010-05-13T13:31:24Z Indexed on 2010/05/13 13:34 UTC
Read the original article Hit count: 204

Filed under:
|
|

Hi

I know that Spring doesn't supports Interface injection and I've read that many a times.

But today as I came across an article about IOC by Martin Fowler (link), it seems using ApplicationContextAware in Spring is some what similar to the Interface injection.

when ever Spring' context reference is required in our Spring bean, we'll implement ApplicationContextAware and will implement the setApplicationContext(ApplicationContext context) method, and we'll include the bean in the config file. Is not this the same as Interface injection, where where telling the Spring to inject (or), say, pass the reference of the context into this bean?

Or I m missing something here? Thanks for any information!

ManiKanta

© Stack Overflow or respective owner

Related posts about java

Related posts about spring