本文整理汇总了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;
}