當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。