I am new Springs. In Bean tag I found factory-method and factory-bean Attributes. What is the difference between factory-method and factory-bean?
I am using factory-meth
You can find documentation about this here. See section 3.2.3.2 and 3.2.3.3.
factory-method
is used to point to a static method in legacy code that can be used to create a bean.
Quite similar to using a static factory method to create a bean, is the use of an instance (non-static) factory method, where a factory method of an existing bean from the factory is called to create the new bean.
This is what factory-bean
is for.