精尽 Spring Boot 源码分析 —— ServletWebServerApplicationContext

1. 概述

在 《精尽 Spring Boot 源码分析 —— SpringApplication》 一文中,我们看到 SpringApplication#createApplicationContext() 方法,根据不同的 Web 应用类型,创建不同的 Spring 容器。代码如下:

// SpringApplication.java/*** The class name of application context that will be used by default for non-web* environments.*/
public static final String DEFAULT_CONTEXT_CLASS = "org.springframework.context."+ "annotation.AnnotationConfigApplicationContext";/*** The class name of application context that will be used by default for web* environments.*/
public static final String DEFAULT_SERVLET_WEB_CONTEXT_CLASS = "org.springframework.boot."+ "web.servlet.context.AnnotationConfigServletWebServerApplicationContext";/*** The class name of application context that will be used by default for reactive web* environments.*/
public static final String DEFAULT_REACTIVE_WEB_CONTEXT_CLASS = "org.springframework."+ "boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext";protected ConfigurableApplicationContext createApplicationContext() {// 根据 webApplicationType 类型,获得 ApplicationContext 类型Class<?> contextClass = this.applicationContextClass;if (contextClass == null) {try {switch (this.webApplicationType) {case SERVLET:contextClass = Class.forName(DEFAULT_SERVLET_WEB_CONTEXT_CLASS);break;case REACTIVE:contextClass = Class.forName(DEFAULT_REACTIVE_WEB_CONTEXT_CLASS);break;default:contextClass = Class.forName(DEFAULT_CONTEXT_CLASS);}} catch (ClassNotFoundException ex) {throw new IllegalStateException("Unable create a default ApplicationContext, " + "please specify an ApplicationContextClass", ex);}}// 创建 ApplicationContext 对象return (ConfigurableApplicationContext) BeanUtils.instantiateClass(contextClass);
}
  • 本文,我们要分享的就是,SERVLET 类型对应的 Spring 容器类型 AnnotationConfigServletWebServerApplicationContext 类。

AnnotationConfigServletWebServerApplicationContext 的类图关系如下:类图

  • 本文,我们只重点看 ServletWebServerApplicationContext 和 AnnotationConfigServletWebServerApplicationContext 类。
  • 为了阅读的友好性,艿艿希望胖友阅读过 《精尽 Spring MVC 源码分析 —— 容器的初始化(三)之 Servlet 3.0 集成》 和 《精尽 Spring MVC 源码分析 —— 容器的初始化(四)之 Spring Boot 集成》 两文。

    艿艿:厚着脸皮说,上面两篇文章提到的内容,基本就不再赘述。
    旁白君:真不要脸!

2. ServletWebServerApplicationContext

org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext ,实现 ConfigurableWebServerApplicationContext 接口,继承 GenericWebApplicationContext 类,Spring Boot 使用 Servlet Web 服务器的 ApplicationContext 实现类。

  • org.springframework.boot.web.servlet.context.ConfigurableWebServerApplicationContext 接口,实现它后,可以获得管理 WebServer 的能力。代码如下:

    // ConfigurableWebServerApplicationContext.javapublic interface ConfigurableWebServerApplicationContext extends ConfigurableApplicationContext, WebServerApplicationContext {/*** Set the server namespace of the context.* @param serverNamespace the server namespace* @see #getServerNamespace()*/void setServerNamespace(String serverNamespace);}
    
    • org.springframework.context.ConfigurableApplicationContext ,是 Spring Framework 提供的类,就不细看了。
    • org.springframework.boot.web.context.WebServerApplicationContext ,继承 ApplicationContext 接口,WebServer ApplicationContext 接口。代码如下:

      // WebServerApplicationContext.javapublic interface WebServerApplicationContext extends ApplicationContext {/*** Returns the {@link WebServer} that was created by the context or {@code null} if* the server has not yet been created.* @return the web server*/WebServer getWebServer();/*** Returns the namespace of the web server application context or {@code null} if no* namespace has been set. Used for disambiguation when multiple web servers are* running in the same application (for example a management context running on a* different port).* @return the server namespace*/String getServerNamespace();}
      
      • 重点是,可以获得 WebServer 的方法。😈 因为获得它,可以做各种 WebServer 的管理。
  • org.springframework.web.context.support.GenericWebApplicationContext ,是 Spring Framework 提供的类,就不细看啦。

2.1 构造方法

// ServletWebServerApplicationContext.java/*** Constant value for the DispatcherServlet bean name. A Servlet bean with this name* is deemed to be the "main" servlet and is automatically given a mapping of "/" by* default. To change the default behavior you can use a* {@link ServletRegistrationBean} or a different bean name.*/
public static final String DISPATCHER_SERVLET_NAME = "dispatcherServlet";/*** Spring  WebServer 对象*/
private volatile WebServer webServer;
/*** Servlet ServletConfig 对象*/
private ServletConfig servletConfig;
/*** 通过 {@link #setServerNamespace(String)} 注入。** 不过貌似,一直没被注入过,可以暂时先无视*/
private String serverNamespace;public ServletWebServerApplicationContext() {
}public ServletWebServerApplicationContext(DefaultListableBeanFactory beanFactory) {super(beanFactory);
}
  • 简单看看即可。

因为后续的逻辑,涉及到 Spring 容器的初始化的生命周期,所以我们来简单看看 AbstractApplicationContext#refresh() 的方法。代码如下:

// AbstractApplicationContext.java
// `#refresh()` 方法// ... 简化版代码// Allows post-processing of the bean factory in context subclasses.
postProcessBeanFactory(beanFactory); // <1>// Invoke factory processors registered as beans in the context.
invokeBeanFactoryPostProcessors(beanFactory);// Register bean processors that intercept bean creation.
registerBeanPostProcessors(beanFactory);// Initialize message source for this context.
initMessageSource();// Initialize event multicaster for this context.
initApplicationEventMulticaster();// Initialize other special beans in specific context subclasses.
onRefresh(); // <2>// Check for listener beans and register them.
registerListeners();// Instantiate all remaining (non-lazy-init) singletons.
finishBeanFactoryInitialization(beanFactory);// Last step: publish corresponding event.
finishRefresh(); // <3>
  • 这个方法,会被覆写。具体可以看 「2.2 refresh」 小节。但是,即使覆写了,还是会调用该方法。
  • <1> 处,调用 #postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) 方法,具体可以看 「2.3 postProcessBeanFactory」 小节。

    对 Spring BeanFactoryPostProcessor 的机制,可以看看 《【死磕 Spring】—— IoC 之深入分析 BeanFactoryPostProcessor》

  • <2> 处,调用 #onRefresh() 方法,具体可以看 「2.4 onRefresh」 小节。

  • <3> 处,调用 #finishRefresh() 方法,具体可以看 「2.5 finishRefresh」 小节。

2.2 refresh

覆写 #refresh() 方法,初始化 Spring 容器。代码如下:

// ServletWebServerApplicationContext.java@Override
public final void refresh() throws BeansException, IllegalStateException {try {super.refresh();} catch (RuntimeException ex) {// <X> 如果发生异常,停止 WebServerstopAndReleaseWebServer();throw ex;}
}
  • 主要是 <X> 处,如果发生异常,则调用 #stopAndReleaseWebServer() 方法,停止 WebServer。详细解析,见 「2.2.1 stopAndReleaseWebServer」 。

2.2.1 stopAndReleaseWebServer

#stopAndReleaseWebServer() 方法,停止 WebServer。代码如下:

// ServletWebServerApplicationContext.javaprivate void stopAndReleaseWebServer() {// 获得 WebServer 对象,避免被多线程修改了WebServer webServer = this.webServer;if (webServer != null) {try {// 停止 WebServer 对象webServer.stop();// 置空 webServerthis.webServer = null;} catch (Exception ex) {throw new IllegalStateException(ex);}}
}

2.3 postProcessBeanFactory

覆写 #postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) 方法,代码如下:

// ServletWebServerApplicationContext.java@Override
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {// <1.1> 注册 WebApplicationContextServletContextAwareProcessorbeanFactory.addBeanPostProcessor(new WebApplicationContextServletContextAwareProcessor(this));// <1.2> 忽略 ServletContextAware 接口。beanFactory.ignoreDependencyInterface(ServletContextAware.class);// <2> 注册 ExistingWebApplicationScopesregisterWebApplicationScopes();
}
  • <1.1> 处,注册 WebApplicationContextServletContextAwareProcessor 。WebApplicationContextServletContextAwareProcessor 的作用,主要是处理实现 ServletContextAware 接口的 Bean 。在这个处理类,初始化这个 Bean 中的 ServletContext 属性,这样在实现 ServletContextAware 接口的 Bean 中就可以拿到 ServletContext 对象了,Spring 中 Aware 接口就是这样实现的。代码如下:

    // WebApplicationContextServletContextAwareProcessor.javapublic class WebApplicationContextServletContextAwareProcessor extends ServletContextAwareProcessor {private final ConfigurableWebApplicationContext webApplicationContext;public WebApplicationContextServletContextAwareProcessor(ConfigurableWebApplicationContext webApplicationContext) {Assert.notNull(webApplicationContext, "WebApplicationContext must not be null");this.webApplicationContext = webApplicationContext;}@Overrideprotected ServletContext getServletContext() {ServletContext servletContext = this.webApplicationContext.getServletContext();return (servletContext != null) ? servletContext : super.getServletContext();}@Overrideprotected ServletConfig getServletConfig() {ServletConfig servletConfig = this.webApplicationContext.getServletConfig();return (servletConfig != null) ? servletConfig : super.getServletConfig();}}
    
    • 这样,就可以从 webApplicationContext 中,获得 ServletContext 和 ServletConfig 属性。
  • <1.2> 处,忽略 ServletContextAware 接口,因为实现 ServletContextAware 接口的 Bean 在 <1.1> 中的 WebApplicationContextServletContextAwareProcessor 中已经处理了。
  • 关于 <1.1> 和 <1.2> 处的说明,参考 《Spring Boot 源码3 —— refresh ApplicationContext》 文章。

    艿艿:当读源码碰到困难时,也要善用搜索引擎,去寻找答案。😈 毕竟,有时候脑子不一定能快速想的明白。哈哈哈哈~

  • <2> 处,调用 #registerWebApplicationScopes() 方法,注册 ExistingWebApplicationScopes 。代码如下:

    // ServletWebServerApplicationContext.javaprivate void registerWebApplicationScopes() {// 创建 ExistingWebApplicationScopes 对象ExistingWebApplicationScopes existingScopes = new ExistingWebApplicationScopes(getBeanFactory());// 注册 ExistingWebApplicationScopes 到 WebApplicationContext 中WebApplicationContextUtils.registerWebApplicationScopes(getBeanFactory());// 恢复existingScopes.restore();
    }
    
    • 可以先不细研究~

2.4 onRefresh

覆写 #onRefresh() 方法,在容器初始化时,完成 WebServer 的创建(不包括启动)。代码如下:

// ServletWebServerApplicationContext.java@Override
protected void onRefresh() {// <1> 调用父方法super.onRefresh();try {// 创建 WebServercreateWebServer();} catch (Throwable ex) {throw new ApplicationContextException("Unable to start web server", ex);}
}
  • <1> 处,调用父 #onRefresh() 方法,执行父逻辑。这块,暂时不用了解。
  • <2> 处,调用 #createWebServer() 方法,创建 WebServer 对象。详细解析,见 「2.4.1 createWebServer」 。

2.4.1 createWebServer

#createWebServer() 方法,创建 WebServer 对象。

// ServletWebServerApplicationContext.javaprivate void createWebServer() {WebServer webServer = this.webServer;ServletContext servletContext = getServletContext();// <1> 如果 webServer 为空,说明未初始化if (webServer == null && servletContext == null) {// <1.1> 获得 ServletWebServerFactory 对象ServletWebServerFactory factory = getWebServerFactory();// <1.2> 获得 ServletContextInitializer 对象// <1.3> 创建(获得) WebServer 对象this.webServer = factory.getWebServer(getSelfInitializer());// TODO 1002 芋艿这个情况是?} else if (servletContext != null) {try {getSelfInitializer().onStartup(servletContext);} catch (ServletException ex) {throw new ApplicationContextException("Cannot initialize servlet context", ex);}}// <3> 初始化 PropertySourceinitPropertySources();
}
  • <1> 处,如果 webServer 为空,说明未初始化。

    • <1.1> 处,调用 #getWebServerFactory() 方法,获得 ServletWebServerFactory 对象。代码如下:

      // ServletWebServerApplicationContext.javaprotected ServletWebServerFactory getWebServerFactory() {// Use bean names so that we don't consider the hierarchy// 获得 ServletWebServerFactory 类型对应的 Bean 的名字们String[] beanNames = getBeanFactory().getBeanNamesForType(ServletWebServerFactory.class);// 如果是 0 个,抛出 ApplicationContextException 异常,因为至少要一个if (beanNames.length == 0) {throw new ApplicationContextException("Unable to start ServletWebServerApplicationContext due to missing " + "ServletWebServerFactory bean.");}// 如果是 > 1 个,抛出 ApplicationContextException 异常,因为不知道初始化哪个if (beanNames.length > 1) {throw new ApplicationContextException("Unable to start ServletWebServerApplicationContext due to multiple " + "ServletWebServerFactory beans : " + StringUtils.arrayToCommaDelimitedString(beanNames));}// 获得 ServletWebServerFactory 类型对应的 Bean 对象return getBeanFactory().getBean(beanNames[0], ServletWebServerFactory.class);
      }
      
      • 默认情况下,此处返回的会是 org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory 对象。
      • 在我们引入 spring-boot-starter-web 依赖时,默认会引入 spring-boot-starter-tomcat 依赖。此时,org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryConfiguration 在自动配置时,会配置出 TomcatServletWebServerFactory Bean 对象。因此,此时会获得 TomcatServletWebServerFactory 对象。
    • <1.2> 处,调用 #getSelfInitializer() 方法,获得 ServletContextInitializer 对象。代码如下:

      // ServletWebServerApplicationContext.javaprivate org.springframework.boot.web.servlet.ServletContextInitializer getSelfInitializer() {return this::selfInitialize; // 和下面等价
      //        return new ServletContextInitializer() {
      //
      //            @Override
      //            public void onStartup(ServletContext servletContext) throws ServletException {
      //                selfInitialize(servletContext);
      //            }
      //
      //        };
      }
      
      • 嘻嘻,返回的是 ServletContextInitializer 匿名对象,内部会调用 #selfInitialize(servletContext) 方法。该方法会在 WebServer 创建后,进行初始化。详细解析,见 「2.4.2 finishRefresh」 小节。
    • <1.3> 处,调用 ServletWebServerFactory#getWebServer(ServletContextInitializer) 方法,创建(获得) WebServer 对象。在这个过程中,会调用 「2.4.2 selfInitialize」 方法。
  • 至此,和 《精尽 Spring MVC 源码分析 —— 容器的初始化(四)之 Spring Boot 集成》 文章,基本是能穿起来了。
  • <2> 处,TODO 1002 不知道原因。有知道的胖友,星球里告知下哟。
  • <3> 处,调用父 #initPropertySources() 方法,初始化 PropertySource 。

2.4.2 selfInitialize

#selfInitialize() 方法,初始化 WebServer 。代码如下:

// ServletWebServerApplicationContext.javaprivate void selfInitialize(ServletContext servletContext) throws ServletException {// <1> 添加 Spring 容器到 servletContext 属性中。prepareWebApplicationContext(servletContext);// <2> 注册 ServletContextScoperegisterApplicationScope(servletContext);// <3> 注册 web-specific environment beans ("contextParameters", "contextAttributes")WebApplicationContextUtils.registerEnvironmentBeans(getBeanFactory(), servletContext);// <4> 获得所有 ServletContextInitializer ,并逐个进行启动for (ServletContextInitializer beans : getServletContextInitializerBeans()) {beans.onStartup(servletContext);}
}
  • <1> 处,调用 #prepareWebApplicationContext(ServletContext servletContext) 方法,添加 Spring 容器到 servletContext 属性中。代码如下:

    // ServletWebServerApplicationContext.javaprotected void prepareWebApplicationContext(ServletContext servletContext) {// 如果已经在 ServletContext 中,则根据情况进行判断。Object rootContext = servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);if (rootContext != null) {// 如果是相同容器,抛出 IllegalStateException 异常。说明可能有重复的 ServletContextInitializers 。if (rootContext == this) {throw new IllegalStateException("Cannot initialize context because there is already a root application context present - " + "check whether you have multiple ServletContextInitializers!");}// 如果不同容器,则直接返回。return;}Log logger = LogFactory.getLog(ContextLoader.class);servletContext.log("Initializing Spring embedded WebApplicationContext");try {// <X> 设置当前 Spring 容器到 ServletContext 中servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, this);// 打印日志if (logger.isDebugEnabled()) {logger.debug("Published root WebApplicationContext as ServletContext attribute with name [" + WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE + "]");}// <Y> 设置到 `servletContext` 属性中。setServletContext(servletContext);// 打印日志if (logger.isInfoEnabled()) {long elapsedTime = System.currentTimeMillis() - getStartupDate();logger.info("Root WebApplicationContext: initialization completed in " + elapsedTime + " ms");}} catch (RuntimeException | Error ex) {logger.error("Context initialization failed", ex);servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ex);throw ex;}
    }
    
    • 虽然代码非常长,但是核心在 <X> 和 <Y> 处。
    • 通过 <X> 处,从 servletContext 的属性种,可以拿到其拥有的 Spring 容器。
    • 通过 <Y> 处,Spring 容器的 servletContext 属性,可以拿到 ServletContext 对象。
  • <2> 处,调用 #registerApplicationScope(ServletContext servletContext) 方法,注册 ServletContextScope 。代码如下:

    // ServletWebServerApplicationContext.javaprivate void registerApplicationScope(ServletContext servletContext) {ServletContextScope appScope = new ServletContextScope(servletContext);getBeanFactory().registerScope(WebApplicationContext.SCOPE_APPLICATION, appScope);// Register as ServletContext attribute, for ContextCleanupListener to detect it.servletContext.setAttribute(ServletContextScope.class.getName(), appScope);
    }
    
    • 不用细了解。
  • <3> 处,调用 WebApplicationContextUtils#registerEnvironmentBeans(ConfigurableListableBeanFactory bf, ServletContext sc) 方法,注册 web-specific environment beans ("contextParameters", "contextAttributes") 。这样,从 BeanFactory 中,也可以获得到 servletContext 。当然,也可以暂时不用细了解。

  • <4> 处,获得所有 ServletContextInitializer ,并逐个进行启动。关于这块的解析,我们在 《精尽 Spring MVC 源码分析 —— 容器的初始化(四)之 Spring Boot 集成》 中,已经详细写到。😈
  • 至此,内嵌的 Servlet Web 服务器,已经能够被请求了。

2.5 finishRefresh

覆写 #finishRefresh() 方法,在容器初始化完成时,启动 WebServer 。代码如下:

// ServletWebServerApplicationContext.java@Override
protected void finishRefresh() {// <1> 调用父方法super.finishRefresh();// <2> 启动 WebServerWebServer webServer = startWebServer();// <3> 如果创建 WebServer 成功,发布 ServletWebServerInitializedEvent 事件if (webServer != null) {publishEvent(new ServletWebServerInitializedEvent(webServer, this));}
}
  • <1> 处,调用 #finishRefresh() 方法,执行父逻辑。这块,暂时不用了解。
  • <2> 处,调用 #startWebServer() 方法,启动 WebServer 。详细解析,见 「2.5.1 startWebServer」 。
  • <3> 处,如果创建 WebServer 成功,发布 ServletWebServerInitializedEvent 事件。

2.5.1 startWebServer

#startWebServer() 方法,启动 WebServer 。代码如下:

// ServletWebServerApplicationContext.javaprivate WebServer startWebServer() {WebServer webServer = this.webServer;if (webServer != null) {webServer.start();}return webServer;
}

2.6 onClose

覆写 #onClose() 方法,在 Spring 容器被关闭时,关闭 WebServer 。代码如下:

// ServletWebServerApplicationContext.java@Override
protected void onClose() {// 调用父方法super.onClose();// 停止 WebServerstopAndReleaseWebServer();
}

3. AnnotationConfigServletWebServerApplicationContext

org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext ,继承 ServletWebServerApplicationContext 类,实现 AnnotationConfigRegistry 接口,进一步提供了两个功能:

艿艿:不过一般情况下,我们用不到这两个功能。简单看了下,更多的是单元测试,需要使用到这两个功能。

  • 从指定的 basePackages 包中,扫描 BeanDefinition 们。
  • 从指定的 annotatedClasses 注解的配置类(Configuration)中,读取 BeanDefinition 们。

所以啊,这类,简单看看就成啦。

3.1 构造方法

// AnnotationConfigServletWebServerApplicationContext.javaprivate final AnnotatedBeanDefinitionReader reader;private final ClassPathBeanDefinitionScanner scanner;/*** 需要被 {@link #reader} 读取的注册类们*/
private final Set<Class<?>> annotatedClasses = new LinkedHashSet<>();/*** 需要被 {@link #scanner} 扫描的包*/
private String[] basePackages;public AnnotationConfigServletWebServerApplicationContext() {this.reader = new AnnotatedBeanDefinitionReader(this);this.scanner = new ClassPathBeanDefinitionScanner(this);
}public AnnotationConfigServletWebServerApplicationContext(DefaultListableBeanFactory beanFactory) {super(beanFactory);this.reader = new AnnotatedBeanDefinitionReader(this);this.scanner = new ClassPathBeanDefinitionScanner(this);
}public AnnotationConfigServletWebServerApplicationContext(Class<?>... annotatedClasses) {this();// <1> 注册指定的注解的类们register(annotatedClasses);// 初始化 Spring 容器refresh();
}public AnnotationConfigServletWebServerApplicationContext(String... basePackages) {this();// <2> 扫描指定包scan(basePackages);// 初始化 Spring 容器refresh();
}
  • <1> 处,如果已经传入 annotatedClasses 参数,则调用 #register(Class<?>... annotatedClasses) 方法,设置到 annotatedClasses 中。然后,调用 #refresh() 方法,初始化 Spring 容器。代码如下:
    // AnnotationConfigServletWebServerApplicationContext.java@Override // 实现自 AnnotationConfigRegistry 接口
    public final void register(Class<?>... annotatedClasses) {Assert.notEmpty(annotatedClasses, "At least one annotated class must be specified");this.annotatedClasses.addAll(Arrays.asList(annotatedClasses));
    }
    
  • <2> 处,如果已经传入 basePackages 参数,则调用 #scan(String... basePackages) 方法,设置到 annotatedClasses 中。然后,调用 #refresh() 方法,初始化 Spring 容器。代码如下:
    // AnnotationConfigServletWebServerApplicationContext.java@Override
    public final void scan(String... basePackages) {Assert.notEmpty(basePackages, "At least one base package must be specified");this.basePackages = basePackages;
    }
    

3.2 prepareRefresh

覆写 #prepareRefresh() 方法,代码如下:

// AnnotationConfigServletWebServerApplicationContext.java@Override // 实现自 AbstractApplicationContext 抽象类
protected void prepareRefresh() {// 清空 scanner 的缓存this.scanner.clearCache();// 调用父类super.prepareRefresh();
}
  • 在 Spring 容器初始化前,需要清空 scanner 的缓存。

3.3 postProcessBeanFactory

覆写 #postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) 方法,执行 BeanDefinition 的读取。代码如下:

// AnnotationConfigServletWebServerApplicationContext.java@Override
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {// 调用父类super.postProcessBeanFactory(beanFactory);// 扫描指定的包if (this.basePackages != null && this.basePackages.length > 0) {this.scanner.scan(this.basePackages);}// 注册指定的注解的类们定的if (!this.annotatedClasses.isEmpty()) {this.reader.register(ClassUtils.toClassArray(this.annotatedClasses));}
}
  • 实际场景下,this.basePackages 和 annotatedClasses 都是空的。所以呢,哈哈哈哈,AnnotationConfigServletWebServerApplicationContext 基本没啥子用~

666. 彩蛋

简单小文一篇~很妥~

参考和推荐如下文章:

  • oldflame-Jm
    • 《Spring boot 源码分析-AnnotationConfigApplicationContext 非 web 环境下的启动容器(2)》
    • 《Spring boot 源码分析-AnnotationConfigEmbeddedWebApplicationContext 默认 web 环境下的启动容器(3)》
Yestar123456
发布了24 篇原创文章 · 获赞 0 · 访问量 85
私信关注
查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. 精尽 Spring Boot 源码分析 —— ReactiveWebServerApplicationContext

    精尽 Spring Boot 源码分析 —— ReactiveWebServerApplicationContext1. 概述本文接 《精尽 Spring Boot 源码分析 —— ServletWebServerApplicationContext》 一文,我们来分享 ReactiveWebServerApplicationContext 类,它提供 Reactive Web 环境的 Spring 容器。Annotatio…...

    2024/3/29 6:06:42
  2. 达梦数据库准备工作

    安装好Linux操作系统: [root@monitor ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.10 (Santiago) [root@monitor ~]# 关闭防火墙 和 Selinux: [root@monitor ~]# service iptables stop [root@monitor ~]# chkconfig iptables off [root@monitor…...

    2024/4/17 0:42:02
  3. 精尽 Spring Boot 源码分析 —— 日志系统

    精尽 Spring Boot 源码分析 —— 日志系统1. 概述在使用 Spring Boot 时,默认就已经提供了日志功能,使用 Logback 作为默认的日志框架。本文,我们就来一起研究下,Spring Boot 是如何自动初始化好日志系统的。不了解 Spring Boot 日志功能的胖友,可以先看看 《一起来学 Spr…...

    2024/4/7 0:24:43
  4. 架构设计029 画图 实战四

    pass点赞收藏分享文章举报ailinyingai发布了295 篇原创文章 获赞 6 访问量 4万+他的留言板关注...

    2024/4/18 0:51:37
  5. Java中各种锁机制的介绍

    本文内容 在读很多并发文章中,会提及各种各样锁如公平锁,乐观锁等等,这篇文章介绍各种锁的分类。介绍的内容如下: 1.公平锁 / 非公平锁 2.可重入锁 / 不可重入锁 3.独享锁 / 共享锁 4.互斥锁 / 读写锁 5.乐观锁 / 悲观锁 6.分段锁 7.偏向锁 / 轻量级锁 / 重量级锁 8.自旋锁…...

    2024/3/29 10:16:45
  6. 精尽 Spring Boot 源码分析 —— AutoConfigurationMetadataLoader

    精尽 Spring Boot 源码分析 —— AutoConfigurationMetadataLoader1. 概述本文,我们来补充 《精尽 Spring Boot 源码分析 —— 自动配置》 文章,并未详细解析的 AutoConfigurationMetadataLoader 。在 SpringApplication 中,我们可以看到 AutoConfigurationImportSelector.A…...

    2024/4/16 22:53:50
  7. 精尽 Spring Boot 源码分析 —— SpringFactoriesLoader

    精尽 Spring Boot 源码分析 —— SpringFactoriesLoader1. 概述本文,我们来补充 《精尽 Spring Boot 源码分析 —— SpringApplication》 文章,并未详细解析的 SpringFactoriesLoader 。spring.factories 配置文件,我们可以认为是 Spring 自己的一套 SPI 机制的配置文件,在…...

    2024/4/18 4:11:55
  8. 图像处理工程师的基本要求有哪些

    既然学了人工智能这个专业,研究生期间主要方向是机器学习,计算机视觉,图像处理。所以很想了解现在这个领域的就业方向及相关要求。 今天在“增强视觉 | 计算机视觉 增强现实”上看到一则招聘智能图像/视频处理工程师的广告,岗位要求如下: 动手能力强,熟练掌握C/C++/Matla…...

    2024/4/17 2:39:20
  9. GIT commit问题 No errors and 30 warnings found. Would you like to review them?

    点赞收藏分享文章举报胖带鱼发布了21 篇原创文章 获赞 0 访问量 193私信关注...

    2024/4/16 8:29:12
  10. 转载之Java代码优化细节

    可以提高千倍效率的Java代码小技巧来源:www.cnblogs.com/Qian123/p/6046096.html前言代码优化 ,一个很重要的课题。可能有些人觉得没用,一些细小的地方有什么好修改的,改与不改对于代码的运行效率有什么影响呢?这个问题我是这么考虑的,就像大海里面的鲸鱼一样,它吃一条小…...

    2024/4/17 17:51:33
  11. Babybluetooth框架分析

    点赞收藏分享文章举报humiaor发布了34 篇原创文章 获赞 8 访问量 4万+私信关注...

    2024/4/14 6:59:07
  12. Bash - style

    dd点赞收藏分享文章举报wojiarucs发布了5 篇原创文章 获赞 0 访问量 22私信关注...

    2024/4/12 12:23:17
  13. JAVA专业术语面试100问

    前言: 面试技巧另外开篇再说,先上面试干货吧。 Redis、 消息队列、 SQL 不要走开,关注后更精彩! 1、面向对象的特点有哪些? 抽象、继承、封装、多态。 2、接口和抽象类有什么联系和区别? 3、重载和重写有什么区别? 4、java有哪些基本数据类型? 5、数组有没有length()方…...

    2024/3/29 10:16:42
  14. TortoiseSVN提示Error: Unable to connect to a repository at URL 的解决方法

    右键->SVN,设置里将缓存清空,一般情况下是可以正常连接了点赞收藏分享文章举报MakeGreatEffort发布了127 篇原创文章 获赞 174 访问量 108万+他的留言板关注...

    2024/4/9 12:17:16
  15. java序列化详解

    遇到这个 Java Serializable 序列化这个接口,我们可能会有如下的问题 a,什么叫序列化和反序列化 b,作用。为啥要实现这个 Serializable 接口,也就是为啥要序列化 c,serialVersionUID 这个的值到底是在怎么设置的,有什么用。有的是1L,有的是一长串数字,迷惑ing。 我刚刚…...

    2024/4/18 6:18:55
  16. Android使用https

    注:所有转载文章只作为学习记录,无其他想法。 前言 HI,欢迎来到裴智飞的《每周一博》。今天是九月第三周,我给大家介绍一下安卓如何使用https。 HTTP协议被用于在Web浏览器和网站服务器之间传递信息,HTTP协议以明文方式发送内容,不提供任何方式的数据加密,如果攻击者截取…...

    2024/3/31 2:51:26
  17. 【转载】基于redis的分布式锁

    前言分布式锁一般有三种实现方式:1. 数据库乐观锁;2. 基于Redis的分布式锁;3. 基于ZooKeeper的分布式锁。本篇博客将介绍第二种方式,基于Redis实现分布式锁。虽然网上已经有各种介绍Redis分布式锁实现的博客,然而他们的实现却有着各种各样的问题,为了避免误人子弟,本篇博…...

    2024/4/6 19:01:57
  18. linux安装oracle时出现乱码已解决

    llinux安装oracle出现乱码解决 原因分析:oracle安装包提供的jdk内缺少中文字体 解决办法:往oracle安装包提供的jdk内拷贝中文字体zysong.ttf 一、操作系统:centos7,oracle版本:11gr2 在解压出oracle安装包后,找到database/stage/Components/oracle.jdk/1.5.0.17.0/1/Data…...

    2024/4/7 3:05:29
  19. Epoll模型详解

    1. 内核中提高I/O性能的新方法epollepoll是什么?按照man手册的说法:是为处理大批量句柄而作了改进的poll。要使用epoll只需要这三个系统调 用:epoll_create(2), epoll_ctl(2), epoll_wait(2)。当然,这不是2.6内核才有的,它是在 2.5.44内核中被引进的(epoll(4) is a new …...

    2024/4/18 8:57:45
  20. js vue获取本地时间

    js vue 获取本地时间地方法及计算 let yy = new Date().getFullYear(); let mm = new Date().getMonth()+1; let dd = new Date().getDate(); let hh = new Date().getHours(); let mf = new Date().getMinutes()<10 ? ‘0’+new Date().getMinutes() : new Date().getMinu…...

    2024/4/17 2:39:56

最新文章

  1. 【C++从练气到飞升】08---模板

    &#x1f388;个人主页&#xff1a;库库的里昂 ✨收录专栏&#xff1a;C从练气到飞升 &#x1f389;鸟欲高飞先振翅&#xff0c;人求上进先读书。 目录 一、泛型编程 什么是泛型编程: 二、函数模板 1. 函数模板概念 2. 函数模板格式 3. 函数模板的原理 4. 函数模板的实例…...

    2024/4/18 15:44:24
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/3/20 10:50:27
  3. javaScript 事件循环 Event Loop

    一、前言 javaScript 是单线程的编程语言&#xff0c;只能同一时间内做一件事情&#xff0c;按照顺序来处理事件&#xff0c;但是在遇到异步事件的时候&#xff0c;js线程并没有阻塞&#xff0c;还会继续执行&#xff0c;这又是为什么呢&#xff1f; 二、基础知识 堆&#x…...

    2024/4/12 15:28:29
  4. AI小程序的创业方向:深度思考与逻辑引领

    随着人工智能技术的快速发展&#xff0c;AI小程序逐渐成为创业的新热点。在这个充满机遇与挑战的时代&#xff0c;我们有必要深入探讨AI小程序的创业方向&#xff0c;以把握未来的发展趋势。 一、目标市场定位 首先&#xff0c;我们要明确目标市场。针对不同的用户需求&#x…...

    2024/4/17 8:07:05
  5. Android 关机充电动画卡住无反应,也不灭屏

    充电动画&#xff1a; 1.普通充电 2.快速充电&#xff1a; 原因&#xff1a;低电关机充电&#xff0c;电压升压导致充电逻辑混乱&#xff0c;5v到9v时&#xff0c;导致充电动画卡死。 办法&#xff1a;删掉原来的快充通道&#xff0c;替换为普通充电通道&#xff01; /vend…...

    2024/4/17 13:03:55
  6. 【外汇早评】美通胀数据走低,美元调整

    原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...

    2024/4/18 0:33:31
  7. 【原油贵金属周评】原油多头拥挤,价格调整

    原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...

    2024/4/17 20:29:59
  8. 【外汇周评】靓丽非农不及疲软通胀影响

    原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...

    2024/4/18 9:45:31
  9. 【原油贵金属早评】库存继续增加,油价收跌

    原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...

    2024/4/17 2:33:17
  10. 【外汇早评】日本央行会议纪要不改日元强势

    原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...

    2024/4/17 7:50:46
  11. 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响

    原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...

    2024/4/18 3:56:01
  12. 【外汇早评】美欲与伊朗重谈协议

    原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...

    2024/4/18 3:56:04
  13. 【原油贵金属早评】波动率飙升,市场情绪动荡

    原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...

    2024/4/18 3:55:30
  14. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

    原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...

    2024/4/18 3:55:54
  15. 【原油贵金属早评】市场情绪继续恶化,黄金上破

    原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...

    2024/4/18 3:55:45
  16. 【外汇早评】美伊僵持,风险情绪继续升温

    原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...

    2024/4/17 21:50:30
  17. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

    原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...

    2024/4/15 13:53:08
  18. 氧生福地 玩美北湖(上)——为时光守候两千年

    原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...

    2024/4/15 9:16:52
  19. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

    原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...

    2024/4/18 9:24:29
  20. 氧生福地 玩美北湖(下)——奔跑吧骚年!

    原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...

    2024/4/18 3:56:18
  21. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

    原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...

    2024/4/18 3:55:57
  22. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

    原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...

    2024/4/18 3:55:50
  23. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

    原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...

    2024/4/15 23:28:22
  24. 广州械字号面膜生产厂家OEM/ODM4项须知!

    原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...

    2024/4/18 3:56:20
  25. 械字号医用眼膜缓解用眼过度到底有无作用?

    原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...

    2024/4/18 3:56:11
  26. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  27. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  28. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  29. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  30. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  31. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  32. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  33. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  34. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  35. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  36. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  37. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  38. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  39. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  40. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  41. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  42. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  43. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  44. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  45. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57