How to declare a DAO variable using an interface but put in it a concrete implementation in Spring Framework?

The very essence of interface and concrete implementation is to preserve polymorphism. In a testing environment you could use a different concrete implementation but same interface, while in developing mode another implementation could be put in the xml configuration. It would be easily for you to swap xml configurations without changing the java code like swapping from developing to testing environment or another tester would use your same code but with different xml configurations.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions