SpringBoot的onRefresh()方法
// Initialize other special beans in specific context subclasses.
如图,这是Spring的Onfresh()方法,为空就是为了就让需要用的工程自己去实现!
refresh()方法中需要指定this,当没有项目启动的时候,直接点进去看,是看Spring自己的onRefresh()方法,为空
当使启动SpringBoot的时候,用debug点进去(F7),进入的是SpringBoot的jar包中的 自己实现的onRefresh()方法
补充:
super.onRefresh() :用于注册主题信息
createWebServer():Tomcat/Jetty源码就是在这一步中实现的
SpringBoot的refresh()中Onfresh()为空?
最新推荐文章于 2023-02-14 20:43:19 发布