Package net.csdn.common.settings

Examples of net.csdn.common.settings.Settings


        method.setAccessible(true);
        method.invoke(null);
    }

    public static Class[] findTestClass() throws Exception {
        Settings settings = ServiceFramwork.injector.getInstance(Settings.class);
        List<Class> classList = new ArrayList<Class>();
        List<String> classStrs = ServiceFramwork.scanService.classNames(settings.get("application.test"), DynamicSuite.class);
        for (String abc : classStrs) {
            classList.add(Class.forName(abc));
        }
        Class[] classes = testClasses.length > 0 ? testClasses : new Class[classList.size()];
        classList.toArray(classes);
View Full Code Here


        Tuple<Settings, Environment> tuple = InternalSettingsPreparer.prepareSettings(EMPTY_SETTINGS);
        if (ServiceFramwork.mode.equals(ServiceFramwork.Mode.development)) {
            ServiceFramwork.mode = ServiceFramwork.Mode.valueOf(tuple.v1().get("mode"));
        }

        Settings settings = tuple.v1();
        boolean disableMysql = settings.getAsBoolean(ServiceFramwork.mode + ".datasources.mysql.disable", false);
        boolean disableMongo = settings.getAsBoolean(ServiceFramwork.mode + ".datasources.mongodb.disable", false);
        boolean disableHttp = settings.getAsBoolean("http.disable", false);
        boolean disableThrift = settings.getAsBoolean("thrift.disable", true);

        Loader loggerLoader = new LoggerLoader();

        loggerLoader.load(settings);
View Full Code Here

public class Main {
    public static void main(String[] args) {
        //find the config file

        InputStream inputStream = Main.class.getResourceAsStream("application_for_test.yml");
        Settings settings = InternalSettingsPreparer.simplePrepareSettings(ImmutableSettings.Builder.EMPTY_SETTINGS,
                inputStream);

        //configure MongoMongo
        try {
            MongoMongo.CSDNMongoConfiguration csdnMongoConfiguration = new MongoMongo.CSDNMongoConfiguration("development", settings, Main.class);
View Full Code Here

TOP

Related Classes of net.csdn.common.settings.Settings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.