解道jdon.com

解道jdon.com -

SpringBoot的​​​​​​​初始化实现方法

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

springboot

相关推荐 去reddit讨论

热榜 Top10

观测云
观测云
LigaAI
LigaAI
Dify.AI
Dify.AI
eolink
eolink

推荐或自荐