gpt4 book ai didi

org.springframework.web.context.support.WebApplicationObjectSupport.initServletContext()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 06:47:05 26 4
gpt4 key购买 nike

本文整理了Java中org.springframework.web.context.support.WebApplicationObjectSupport.initServletContext()方法的一些代码示例,展示了WebApplicationObjectSupport.initServletContext()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebApplicationObjectSupport.initServletContext()方法的具体详情如下:
包路径:org.springframework.web.context.support.WebApplicationObjectSupport
类名称:WebApplicationObjectSupport
方法名:initServletContext

WebApplicationObjectSupport.initServletContext介绍

[英]Subclasses may override this for custom initialization based on the ServletContext that this application object runs in.

The default implementation is empty. Called by #initApplicationContext(org.springframework.context.ApplicationContext)as well as #setServletContext(javax.servlet.ServletContext).
[中]子类可以基于该应用程序对象在其中运行的ServletContext为自定义初始化覆盖该属性。
默认实现为空。由#initApplicationContext(org.springframework.context.ApplicationContext)和#setServletContext(javax.servlet.ServletContext)调用。

代码示例

代码示例来源:origin: spring-projects/spring-framework

@Override
public final void setServletContext(ServletContext servletContext) {
  if (servletContext != this.servletContext) {
    this.servletContext = servletContext;
    initServletContext(servletContext);
  }
}

代码示例来源:origin: org.springframework/spring-web

@Override
public final void setServletContext(ServletContext servletContext) {
  if (servletContext != this.servletContext) {
    this.servletContext = servletContext;
    initServletContext(servletContext);
  }
}

代码示例来源:origin: spring-projects/spring-framework

/**
 * Calls {@link #initServletContext(javax.servlet.ServletContext)} if the
 * given ApplicationContext is a {@link WebApplicationContext}.
 */
@Override
protected void initApplicationContext(ApplicationContext context) {
  super.initApplicationContext(context);
  if (this.servletContext == null && context instanceof WebApplicationContext) {
    this.servletContext = ((WebApplicationContext) context).getServletContext();
    if (this.servletContext != null) {
      initServletContext(this.servletContext);
    }
  }
}

代码示例来源:origin: org.springframework/spring-web

/**
 * Calls {@link #initServletContext(javax.servlet.ServletContext)} if the
 * given ApplicationContext is a {@link WebApplicationContext}.
 */
@Override
protected void initApplicationContext(ApplicationContext context) {
  super.initApplicationContext(context);
  if (this.servletContext == null && context instanceof WebApplicationContext) {
    this.servletContext = ((WebApplicationContext) context).getServletContext();
    if (this.servletContext != null) {
      initServletContext(this.servletContext);
    }
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web

@Override
public final void setServletContext(ServletContext servletContext) {
  if (servletContext != this.servletContext) {
    this.servletContext = servletContext;
    initServletContext(servletContext);
  }
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public final void setServletContext(ServletContext servletContext) {
  if (servletContext != this.servletContext) {
    this.servletContext = servletContext;
    initServletContext(servletContext);
  }
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Calls {@link #initServletContext(javax.servlet.ServletContext)} if the
 * given ApplicationContext is a {@link WebApplicationContext}.
 */
@Override
protected void initApplicationContext(ApplicationContext context) {
  super.initApplicationContext(context);
  if (this.servletContext == null && context instanceof WebApplicationContext) {
    this.servletContext = ((WebApplicationContext) context).getServletContext();
    if (this.servletContext != null) {
      initServletContext(this.servletContext);
    }
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web

/**
 * Calls {@link #initServletContext(javax.servlet.ServletContext)} if the
 * given ApplicationContext is a {@link WebApplicationContext}.
 */
@Override
protected void initApplicationContext(ApplicationContext context) {
  super.initApplicationContext(context);
  if (this.servletContext == null && context instanceof WebApplicationContext) {
    this.servletContext = ((WebApplicationContext) context).getServletContext();
    if (this.servletContext != null) {
      initServletContext(this.servletContext);
    }
  }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com