By default ApplicationContext implementations is to pre-instantiate all singleton beans at startup. But this is not desired always so you can disable this feature.

Java Code:
<bean id="samplelazy" class="org.cpchmps.ExpensiveeBean" lazy-init="true">
<!—write  properties here... -->

</bean>
<bean name="not.lazy" class="org.compchamps.NextBean">
<!—write  properties here... -->
</bean>