Spring Autowiring sucks

There, I said it.

I can see how autowiring can seem like a cute way to wire interfaces to concrete implementations but , no matter how hard I try, I just like it. I’d go so far to classify the concept as a code smell. I can see how autowiring is useful for situations where there is a 1:1 mapping between the interface and implementation, or bean instances but beyond that, it’s just another way to create complexity. There’s always the option of using @Qualifier() but that’s missing the point.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s