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


Java ContextConfiguration.value方法代码示例

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


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

示例1: initializeProcessEngine

import org.springframework.test.context.ContextConfiguration; //导入方法依赖的package包/类
@Override
protected void initializeProcessEngine() {
  ContextConfiguration contextConfiguration = getClass().getAnnotation(ContextConfiguration.class);
  String[] value = contextConfiguration.value();
  if (value==null) {
    throw new ActivitiException("value is mandatory in ContextConfiguration");
  }
  if (value.length!=1) {
    throw new ActivitiException("SpringActivitiTestCase requires exactly one value in annotation ContextConfiguration");
  }
  String configurationFile = value[0];
  processEngine = cachedProcessEngines.get(configurationFile);
  if (processEngine==null) {
    processEngine = applicationContext.getBean(ProcessEngine.class);
    cachedProcessEngines.put(configurationFile, processEngine);
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:18,代码来源:SpringActivitiTestCase.java

示例2: initializeContentEngine

import org.springframework.test.context.ContextConfiguration; //导入方法依赖的package包/类
@Override
protected void initializeContentEngine() {
    ContextConfiguration contextConfiguration = getClass().getAnnotation(ContextConfiguration.class);
    String[] value = contextConfiguration.value();
    boolean hasOneArg = value != null && value.length == 1;
    String key = hasOneArg ? value[0] : ContentEngine.class.getName();
    ContentEngine engine = this.cachedContentEngines.containsKey(key) ? this.cachedContentEngines.get(key) : this.applicationContext.getBean(ContentEngine.class);

    this.cachedContentEngines.put(key, engine);
    this.contentEngine = engine;
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:12,代码来源:SpringFlowableTestCase.java

示例3: initializeFormEngine

import org.springframework.test.context.ContextConfiguration; //导入方法依赖的package包/类
@Override
protected void initializeFormEngine() {
    ContextConfiguration contextConfiguration = getClass().getAnnotation(ContextConfiguration.class);
    String[] value = contextConfiguration.value();
    boolean hasOneArg = value != null && value.length == 1;
    String key = hasOneArg ? value[0] : FormEngine.class.getName();
    FormEngine engine = this.cachedFormEngines.containsKey(key) ? this.cachedFormEngines.get(key) : this.applicationContext.getBean(FormEngine.class);

    this.cachedFormEngines.put(key, engine);
    this.formEngine = engine;
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:12,代码来源:SpringFlowableTestCase.java

示例4: initializeDmnEngine

import org.springframework.test.context.ContextConfiguration; //导入方法依赖的package包/类
@Override
protected void initializeDmnEngine() {
    ContextConfiguration contextConfiguration = getClass().getAnnotation(ContextConfiguration.class);
    String[] value = contextConfiguration.value();
    boolean hasOneArg = value != null && value.length == 1;
    String key = hasOneArg ? value[0] : DmnEngine.class.getName();
    DmnEngine engine = this.cachedDmnEngines.containsKey(key) ? this.cachedDmnEngines.get(key) : this.applicationContext.getBean(DmnEngine.class);

    this.cachedDmnEngines.put(key, engine);
    this.dmnEngine = engine;
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:12,代码来源:SpringFlowableTestCase.java

示例5: initializeProcessEngine

import org.springframework.test.context.ContextConfiguration; //导入方法依赖的package包/类
@Override
protected void initializeProcessEngine() {
    ContextConfiguration contextConfiguration = getClass().getAnnotation(ContextConfiguration.class);
    String[] value = contextConfiguration.value();
    boolean hasOneArg = value != null && value.length == 1;
    String key = hasOneArg ? value[0] : ProcessEngine.class.getName();
    ProcessEngine engine = this.cachedProcessEngines.containsKey(key) ? this.cachedProcessEngines.get(key) : this.applicationContext.getBean(ProcessEngine.class);

    this.cachedProcessEngines.put(key, engine);
    this.processEngine = engine;
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:12,代码来源:SpringFlowableTestCase.java

示例6: initializeCmmnEngine

import org.springframework.test.context.ContextConfiguration; //导入方法依赖的package包/类
protected void initializeCmmnEngine() {
    ContextConfiguration contextConfiguration = getClass().getAnnotation(ContextConfiguration.class);
    String[] value = contextConfiguration.value();
    boolean hasOneArg = value != null && value.length == 1;
    String key = hasOneArg ? value[0] : CmmnEngine.class.getName();
    CmmnEngine engine = this.cachedCmmnEngines.containsKey(key) ? this.cachedCmmnEngines.get(key) : this.applicationContext.getBean(CmmnEngine.class);

    this.cachedCmmnEngines.put(key, engine);
    this.cmmnEngine = engine;
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:11,代码来源:SpringFlowableTestCase.java

示例7: initializeIdmEngine

import org.springframework.test.context.ContextConfiguration; //导入方法依赖的package包/类
@Override
protected void initializeIdmEngine() {
    ContextConfiguration contextConfiguration = getClass().getAnnotation(ContextConfiguration.class);
    String[] value = contextConfiguration.value();
    boolean hasOneArg = value != null && value.length == 1;
    String key = hasOneArg ? value[0] : IdmEngine.class.getName();
    IdmEngine engine = this.cachedIdmEngines.containsKey(key) ? this.cachedIdmEngines.get(key) : this.applicationContext.getBean(IdmEngine.class);

    this.cachedIdmEngines.put(key, engine);
    this.idmEngine = engine;
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:12,代码来源:SpringFlowableIdmTestCase.java


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