All Downloads are FREE. Search and download functionalities are using the official Maven repository.

win.doyto.query.config.DoytoQueryInitializer Maven / Gradle / Ivy

There is a newer version: 0.2.2.1-RELEASE
Show newest version
package win.doyto.query.config;

import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * DoytoQueryInitializer
 *
 * @author f0rb
 */
public class DoytoQueryInitializer implements ApplicationContextInitializer {
    private static final String MAP_CAMEL_CASE_TO_UNDERSCORE = "doyto.query.config.map-camel-case-to-underscore";

    @Override
    public void initialize(ConfigurableApplicationContext context) {
        ConfigurableEnvironment environment = context.getEnvironment();
        String enabled = environment.getProperty(MAP_CAMEL_CASE_TO_UNDERSCORE, "false");
        GlobalConfiguration.instance().setMapCamelCaseToUnderscore(Boolean.valueOf(enabled));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy