本文整理匯總了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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}