Monday, September 22, 2014

FactoryBean Woes

Be careful with org.springframework.beans.factory.FactoryBean. I created a couple of them and used them with something like <bean id="mybean" class="pkg.myfactory" />
Everything seemed to work fine. Then as soon as I added a third and fourth, everything went haywire and started getting no end to circular dependency errors. So I had to switch to plain vanilla "factory-bean" beans in xml and everything was fine then!