在一般业务场景,可能是不需要关心一个bean是如何被注册进spring容器的,只需要把需要注册进容器的bean声明为
@Component即可,因为spring会自动扫描到这个Bean完成初始化并加载到spring上下文容器。