SpringBoot入门及其分析

2020-11-13
阅读 1 分钟
972
@Component//此注解用于描述spring管理一般的组件@SpringBootTest//此注解描述的类为springboot工程的 单元测试类@Autowired//告诉spring请安指定规则为此属性复制@Lazy延迟加载(按需加载)只有被需要时才被创建,和单例配合使用@PostConstruct 生命周期初始化方法,在对象构建以后执行.@PreDestroy 生命周期销毁方法,此...