I had made custom example by taking reference from here
Example is working fine in the system.
As part of understanding Spring Framework, I was trying to figure out difference between features of Spring IOC and Spring MVC.
Does IOC used primarily for instantiating SessionFactory,Database Configurations,path’s for viewResolver.
IOC is a mechanism by which spring-managed beans are ‘given’ references to implementations of classes it needs. Spring, manages all the registered beans in your configuration and configures every bean with whatever it needs via annotations like
@Autowiredor explicitly through xml configuration.Even though IOC is used heavily to instantiate implementations of the things you’ve mentioned, it can be used to instantiate and configure any kind of class, even your own.