SpringBoot的初始化实现方法
目前,在spring中,有很多方法可以初始化bean: 使用@PostConstruct注解 实现InitializingBean接口 1、使用@PostConstruct注解 @Service public class AService { @PostConstruct public void init() { System.out.println( "===init===" ); } } 给需要初始化的方法添加注解@PostConstruct,以便它们能够初始化 2、实现In..