Java项目启动时执行指定方法的几种方式
1.使用 @PostConstruct,作用于方法上面。 2.使用 CommandLineRunner 接口 3.使用 ApplicationRunner 接口 以上三种方式都是在项 ...
1.使用 @PostConstruct,作用于方法上面。 2.使用 CommandLineRunner 接口 3.使用 ApplicationRunner 接口 以上三种方式都是在项 ...