Spring扩展接口-初始化(@PostConstruct,afterPropertiesset, init-method)

Spring实例化之后,提供三种初始化的方法: 使用JSR-250规范定义的@Postconstruct注解。 实现InitializingBean接口,实现afterPropertiesset()方法。 使用Spring提供的@Bean init-method标签。 执行顺序:@Postconst
posted @ 2023-10-12 10:07  扎Zn了老Fe  阅读(29)  评论(0编辑  收藏  举报  来源