Issue
Is it necessary that a Spring bean always has to be POJO?
Is there any other ways to create a bean which is not a POJO?
Solution
A Spring bean can be anything. Classes that can be instantiated normally (i.e. Java Beans or any other regular class) can be configured via xml or Java-Config.
Anything that is more complicated can be created via a FactoryBean.
So, to answer your question: Any Java object can become a Spring Bean.
Answered By - David