use of com.tvd12.ezyfox.bean.EzyBeanContextBuilder in project ezyhttp by youngmonkeys.
the class ApplicationContextBuilder method newBeanContextBuilder.
protected EzyBeanContextBuilder newBeanContextBuilder() {
EzyBeanContextBuilder beanContextBuilder = EzyBeanContext.builder().addProperties(properties).addSingletons(singletonByName).addSingletonsByKey(singletonByKey);
List<String> propertiesFiles = new ArrayList<>();
propertiesFiles.addAll(Arrays.asList(DEFAULT_PROPERTIES_FILES));
propertiesFiles.addAll(propertiesSources);
for (String propertiesFile : propertiesFiles) {
beanContextBuilder.addProperties(propertiesFile);
}
return beanContextBuilder;
}
use of com.tvd12.ezyfox.bean.EzyBeanContextBuilder in project ezyfox-server-example by tvd12.
the class PluginEntry method setupBeanContext.
@Override
protected void setupBeanContext(EzyPluginContext context, EzyBeanContextBuilder builder) {
EzyPluginSetting setting = context.getPlugin().getSetting();
String pluginConfigFile = getConfigFile(setting);
builder.addProperties(pluginConfigFile);
logger.info("hello-world plugin config file: {}", pluginConfigFile);
}
use of com.tvd12.ezyfox.bean.EzyBeanContextBuilder in project ezyfox-server-example by tvd12.
the class AppEntry method setupBeanContext.
@Override
protected void setupBeanContext(EzyAppContext context, EzyBeanContextBuilder builder) {
EzyAppSetting setting = context.getApp().getSetting();
String appConfigFile = getConfigFile(setting);
builder.addProperties(appConfigFile);
logger.info("hello-word app config file: {}", appConfigFile);
}
use of com.tvd12.ezyfox.bean.EzyBeanContextBuilder in project ezyfox-server-example by tvd12.
the class AppEntry method setupBeanContext.
@Override
protected void setupBeanContext(EzyAppContext context, EzyBeanContextBuilder builder) {
EzyAppSetting setting = context.getApp().getSetting();
String appConfigFile = getConfigFile(setting);
AppConfig appConfig = readAppConfig(appConfigFile);
logger.info("hello-word app config: {}", appConfig);
}
use of com.tvd12.ezyfox.bean.EzyBeanContextBuilder in project calabash by youngmonkeys.
the class LocalBaseTest method newBeanContext.
protected EzyBeanContext newBeanContext() {
MongoClient mongoClient = newMongoClient();
EzyBeanContextBuilder builder = EzyBeanContext.builder().addSingleton("mongoClient", mongoClient).scan("com.tvd12.calabash.local.test.mappersist");
addAutoImplMongoRepo(builder, mongoClient);
return builder.build();
}
Aggregations