Thursday, September 12, 2013

Circular Dependency in Spring

Circular Dependency :

One object is depending on other object which is also depending on it.

It means

suppose you have two classes A, B.

A -- > B -- >A   is  circular dependency

A is dependent on B and vice-versa .

 Spring IOC throws Runtime exception as ObjectCurrentlyInCreationException .

Spring throws more easily this Exception, in case of Constructor Injection.

source: javapapers.com

No comments:

Post a Comment