how to use spring bean