Tip Details Add a Related Tip

Rate as: Positive Negative

Spring autowiring

If you are using the Spring Java framework, here's some advice: don't use the autowiring feature.

Spring can be configured to autowire dependencies using introspection of the bean classes. This saves you from having to explicitly specify the bean properties and from specifying the constructor arguments. In theory, this sounds great. It saves you from some potential typing, it reduces the size and clutter of your XML Spring configuration files, and it reduces the chance that you'll miss something in the configuration. This makes for a great demo on how easy it is to use Spring and get up and running quickly.

But while it's great for a demo on a small project, it's far less useful on a real-world application. Without having the bean configurations laid-out explicitly, the maintainability of your project gets worse; the bigger your project gets, the harder it is to maintain.

Save yourself the trouble ahead of time. It takes a little longer to get things up and running, but in the long-term you'll be much better off if you turn off the autowiring capability in the Spring framework.
Rating: no ratings, 0 total Votes
Categories: Java spring programming xml
Added: on Oct 01, 2007 at 10:59 am
Added By: javaguy

Comments on this Tip

Add a Comment
There are no comments for this tip
Your Comment:
(how to format)
Rate This Tip:

Verify Humanity:
Sorry, we know it's annoying, but please enter the characters shown in the image to the left so that we know you're an actual person and not an evil spammer. Thanks.
       

Related Tips

Speeding up Spring start up

Categories: spring Java programming
no ratings, 0 comments
– Tip added by an anonymous user on Oct 25, 2007 at 2:10 pm

Choosing an interface in the Spring IoC container

Categories: Java spring programming
no ratings, 0 comments
– Tip added by an anonymous user on Jul 18, 2007 at 6:22 am

How to Syndicate an RSS Feed On Your Site

100% positive, 0 comments
– Tip added by Walkere on Feb 09, 2008 at 5:48 pm

Easy way to create .htaccess files

100% positive, 0 comments
– Tip added by an anonymous user on Apr 01, 2008 at 7:57 am

How to Find a Random Date in PHP

40% positive, 0 comments
– Tip added by Walkere on Feb 07, 2008 at 8:25 pm

Javascript Error: unterminated regular expression literal

100% positive, 0 comments
– Tip added by marty on Jun 26, 2008 at 1:20 pm

Minimize round trips to the server for best performance

100% positive, 0 comments
– Tip added by an anonymous user on Jun 18, 2008 at 4:07 pm

compressing javascript

100% positive, 0 comments
– Tip added by an anonymous user on Jun 12, 2008 at 3:02 pm

Telling when an iframe is done loading

100% positive, 0 comments
– Tip added by an anonymous user on Apr 18, 2008 at 8:05 am

Our best moment was the sunset...

50% positive, 1 comment - last added on Apr 02, 2008 at 5:56 pm
– Tip added by Billy Cenea on Apr 02, 2008 at 5:49 pm

Opening missing files in JEdit

100% positive, 0 comments
– Tip added by an anonymous user on Mar 24, 2008 at 3:18 pm

Copyright date on sites

Categories: web programming php Smarty
100% positive, 0 comments
– Tip added by an anonymous user on Mar 11, 2008 at 8:14 am

Viewing plist files in Leopard

100% positive, 0 comments
– Tip added by an anonymous user on Mar 06, 2008 at 3:21 pm

How to Send E-Mail in PHP: A “Share This” Form

50% positive, 0 comments
– Tip added by Walkere on Feb 06, 2008 at 6:45 pm

1067 errors in Actionscript

no ratings, 0 comments
– Tip added by an anonymous user on Jun 17, 2008 at 9:28 pm

Referencing methods in PHP usort

Categories: php coding programming
no ratings, 0 comments
– Tip added by an anonymous user on Jun 13, 2008 at 11:18 am

CakePHP: Working with Associations

no ratings, 0 comments
– Tip added by an anonymous user on May 08, 2008 at 4:09 am

Creating your own Quick Look Plug-Ins

no ratings, 0 comments
– Tip added by an anonymous user on Apr 29, 2008 at 7:34 am

Is your unit test really a unit test

no ratings, 0 comments
– Tip added by hindy on Feb 29, 2008 at 11:06 am

Javascript: How to Create a Random Number

0% positive, 0 comments
– Tip added by Walkere on Feb 23, 2008 at 9:49 pm