This tutorial gave you an applied approach for using dependency injection with the Spring framework. Both possible way, with annotations and with XML were discussed.