.. highlight:: xml
.. index:: spring, "dependency injection"
************************************
Dependency injection through Spring
************************************
Injecting dependencies for API V2
==================================
::
The ``cassandraHostConfigurator`` bean is created first. The contructor parameters can be used as well as ```` to set up more properties.
The ``keyspaceOperator`` receives in this case, a name, the ``cluster`` object and the ``consistencyLevelPolicy`` bean.
This model assumes you have a *DAO* object but that is not a restriction.
Injecting dependencies for Templates
====================================
::