Spring其他注解

@PostConstruct初始化

@PreDestroy销毁

开启注解扫描

<context:component-scan base-package=""/>

@Component

Bean默认作用范围singleton

@Scope注解用于指定Bean的作用范围

原文地址:https://www.cnblogs.com/yangHS/p/11404028.html