Twelve Best Practices For Spring XML Configurations
Subject:   Good Citizen
Date:   2006-01-26 06:36:31
From:   wireframe
I disagree that setter injection is better than constructor injection. Failing fast at startup if dependencies are not provided, is always better than failing at runtime if a developer forgot to set the dependency.

And implementing "InitializingBean" to check that the setter was called is a complete hack. It couples your service to spring for management of it's lifecycle.

1 to 2 of 2
1 to 2 of 2