当前位置: 首页>>代码示例>>Java>>正文


Java SpringBeanAutowiringSupport.processInjectionBasedOnServletContext方法代码示例

本文整理汇总了Java中org.springframework.web.context.support.SpringBeanAutowiringSupport.processInjectionBasedOnServletContext方法的典型用法代码示例。如果您正苦于以下问题:Java SpringBeanAutowiringSupport.processInjectionBasedOnServletContext方法的具体用法?Java SpringBeanAutowiringSupport.processInjectionBasedOnServletContext怎么用?Java SpringBeanAutowiringSupport.processInjectionBasedOnServletContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.web.context.support.SpringBeanAutowiringSupport的用法示例。


在下文中一共展示了SpringBeanAutowiringSupport.processInjectionBasedOnServletContext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init(ServletConfig config) throws ServletException {
    super.init(config);
    try {
        SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
        configuration.load();
        initializeProviders();
        initializeActiviti();
        addDeployTargets();
        initExtras();
        configuration.logFullConfig();
        processEngine.getProcessEngineConfiguration().getJobExecutor().start();
        LOGGER.info(Messages.ALM_SERVICE_ENV_INITIALIZED);
    } catch (Exception e) {
        LOGGER.error("Initialization error", e);
        throw new ServletException(e);
    }
}
 
开发者ID:SAP,项目名称:cf-mta-deploy-service,代码行数:19,代码来源:BootstrapServlet.java

示例2: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init(final ServletConfig config) throws ServletException {
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());

    // wait when condition is ready for initialization
    _timer.scheduleAtFixedRate(new TimerTask() {
        @Override
        public void run() {
            if (ComponentContext.getApplicationContext() != null) {
                _timer.cancel();

                final TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
                try {
                    ComponentContext.initComponentsLifeCycle();
                } finally {
                    txn.close();
                }
            }
        }
    }, 0, 1000);
}
 
开发者ID:MissionCriticalCloud,项目名称:cosmic,代码行数:22,代码来源:CloudStartupServlet.java

示例3: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init(ServletConfig config) throws ServletException {
    LogUtils.initLog4j("log4j-cloud.xml");
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());

    // wait when condition is ready for initialization
    _timer.scheduleAtFixedRate(new TimerTask() {
        @Override
        public void run() {
            if (ComponentContext.getApplicationContext() != null) {
                _timer.cancel();

                TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
                try {
                    ComponentContext.initComponentsLifeCycle();
                } finally {
                    txn.close();
                }
            }
        }
    }, 0, 1000);
}
 
开发者ID:apache,项目名称:cloudstack,代码行数:23,代码来源:CloudStartupServlet.java

示例4: parseWeixinClass

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
/**
 * 解析微信类
 * 
 * @param clazz
 * @throws ServletException
 * @throws MultiWeixinEncodingAESKeyException
 * @throws IllegalAccessException
 * @throws InstantiationException
 */
private void parseWeixinClass(Class<?> clazz) throws ServletException {
	Weixin wx = clazz.getAnnotation(Weixin.class);
	String url = wx.value();
	// 获取url对应的微信上下文,如果不存在,就新建一个
	WeixinContext context = contextMapper.get(url);
	if (context == null) {
		context = new WeixinContext();
		logger.debug("新建微信上下文(" + url + ")");
		contextMapper.put(url, context);
	}

	// 获取微信上下文的url,如果为空,则赋值
	if (StringUtil.isNull(context.getUrl())) {
		context.setUrl(url);
	}
	
	WeixinSetting setting = new WeixinSetting();
	setting.setUrl(url);
	setting.setAppID(wx.appID());
	setting.setAppSecret(wx.appSecret());
	setting.setEncodingAESKey(wx.encodingAESKey());
	setting.setToken(wx.token());
	
	//配置微信参数
	setContextParameter(context, setting);

	Object wxObj;
	try {
		// 生成微信对象实例
		wxObj = clazz.newInstance();
	} catch (InstantiationException | IllegalAccessException e) {
		throw new InitialWeixinConfigureException("实例化微信对象异常", e);
	}

	// 注入spring服务
	SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(wxObj, getServletContext());

	Method[] methods = clazz.getDeclaredMethods();
	// 解析微信方法
	for (Method method : methods) {
		if (WeixinMethod.hasWeixinAnnotationType(method)) {
			logger.debug("解析微信上下文(" + url + ")微信方法:" + method.getName());
			parseWeixinMethod(context, method, wxObj);
		}
	}
}
 
开发者ID:jweixin,项目名称:jwx,代码行数:56,代码来源:WeixinDispatcherServlet.java

示例5: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init() throws ServletException {
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, this.getServletContext());
}
 
开发者ID:membrane,项目名称:membrane-spring-boot-starter,代码行数:5,代码来源:MembraneServlet.java

示例6: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init(final ServletConfig config) throws ServletException {
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
    s_keysMgr = _keysMgr;
}
 
开发者ID:MissionCriticalCloud,项目名称:cosmic,代码行数:6,代码来源:ConsoleProxyServlet.java

示例7: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init(final ServletConfig config) throws ServletException {
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
}
 
开发者ID:MissionCriticalCloud,项目名称:cosmic,代码行数:5,代码来源:ApiServlet.java

示例8: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init(ServletConfig config) throws ServletException {
    super.init(config);
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this,
      config.getServletContext());
}
 
开发者ID:kaaproject,项目名称:sandbox-frame,代码行数:7,代码来源:ProjectFileServlet.java

示例9: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public final void init(ServletConfig config) throws ServletException {
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
    doInit(config);
}
 
开发者ID:payneteasy,项目名称:superfly,代码行数:6,代码来源:AutowiringServlet.java

示例10: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init() throws ServletException {
	SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, getServletContext());
}
 
开发者ID:to2mbn,项目名称:authlib-agent,代码行数:5,代码来源:YggdrasilServlet.java

示例11: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init(ServletConfig config) throws ServletException {
  super.init(config);
  SpringBeanAutowiringSupport
      .processInjectionBasedOnServletContext(this, config.getServletContext());
}
 
开发者ID:kaaproject,项目名称:kaa,代码行数:7,代码来源:ProfileDownloadServlet.java

示例12: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init(ServletConfig config) throws ServletException {
  super.init(config);
  SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this,
      config.getServletContext());
}
 
开发者ID:kaaproject,项目名称:kaa,代码行数:7,代码来源:SdkServlet.java

示例13: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
public void init(ServletConfig config) throws ServletException {
    super.init(config);
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this,
      config.getServletContext());
}
 
开发者ID:smrjan,项目名称:job4j,代码行数:6,代码来源:JobListServlet.java

示例14: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init(ServletConfig config) throws ServletException {
    SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
    s_keysMgr = _keysMgr;
}
 
开发者ID:apache,项目名称:cloudstack,代码行数:6,代码来源:ConsoleProxyServlet.java

示例15: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init(ServletConfig config) throws ServletException {
  super.init(config);
  SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
}
 
开发者ID:BandwidthOnDemand,项目名称:bandwidth-on-demand,代码行数:6,代码来源:LongPollServlet.java


注:本文中的org.springframework.web.context.support.SpringBeanAutowiringSupport.processInjectionBasedOnServletContext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。