I\'m working on a Spring MVC project, and I have unit tests for all of the various components in the source tree.
For example, if I have a controller HomeContr
Use the InitializingBean interface (implements a method "afterPropertiesSet") or specify an init-method for your beans. InitializingBean is typically easier because you don't need to remember to add the init method to your beans.
Use afterPropertiesSet to ensure everything is injected as non-null, if it is null, throw an Exception.