Search in sources :

Example 6 with EzyBeanContextBuilder

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;
}
Also used : EzyBeanContextBuilder(com.tvd12.ezyfox.bean.EzyBeanContextBuilder) ArrayList(java.util.ArrayList)

Example 7 with EzyBeanContextBuilder

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);
}
Also used : EzyPluginSetting(com.tvd12.ezyfoxserver.setting.EzyPluginSetting)

Example 8 with EzyBeanContextBuilder

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);
}
Also used : EzyAppSetting(com.tvd12.ezyfoxserver.setting.EzyAppSetting)

Example 9 with EzyBeanContextBuilder

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);
}
Also used : EzyAppSetting(com.tvd12.ezyfoxserver.setting.EzyAppSetting) AppConfig(com.example.simple_chat.config.AppConfig)

Example 10 with EzyBeanContextBuilder

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();
}
Also used : MongoClient(com.mongodb.MongoClient) EzyBeanContextBuilder(com.tvd12.ezyfox.bean.EzyBeanContextBuilder)

Aggregations

EzyBeanContextBuilder (com.tvd12.ezyfox.bean.EzyBeanContextBuilder)6 EzyAppSetting (com.tvd12.ezyfoxserver.setting.EzyAppSetting)3 EzyPluginSetting (com.tvd12.ezyfoxserver.setting.EzyPluginSetting)3 MongoClient (com.mongodb.MongoClient)2 EzyBindingContext (com.tvd12.ezyfox.binding.EzyBindingContext)2 EzyMarshaller (com.tvd12.ezyfox.binding.EzyMarshaller)2 EzyUnmarshaller (com.tvd12.ezyfox.binding.EzyUnmarshaller)2 EzyReflection (com.tvd12.ezyfox.reflect.EzyReflection)2 EzyReflectionProxy (com.tvd12.ezyfox.reflect.EzyReflectionProxy)2 EzyResponseFactory (com.tvd12.ezyfoxserver.support.factory.EzyResponseFactory)2 EzyFeatureCommandManager (com.tvd12.ezyfoxserver.support.manager.EzyFeatureCommandManager)2 EzyRequestCommandManager (com.tvd12.ezyfoxserver.support.manager.EzyRequestCommandManager)2 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)2 AppConfig (com.example.simple_chat.config.AppConfig)1 PluginConfig (com.example.simple_chat.plugin.config.PluginConfig)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 EzyBeanContext (com.tvd12.ezyfox.bean.EzyBeanContext)1 EzySingletonFactory (com.tvd12.ezyfox.bean.EzySingletonFactory)1 GraphQLConfiguration (com.tvd12.ezyhttp.server.graphql.GraphQLConfiguration)1 GraphQLDataFetcher (com.tvd12.ezyhttp.server.graphql.GraphQLDataFetcher)1