// Deal with any domain classes configured through the application's runtime
// config. This is treated differently to the other configuration options
// because it can override existing mapping information. Also, it requires
// access to the application config object.
AppConfigClassMapper overrideClassMapper = new AppConfigClassMapper(grailsApplication.getConfig());
overrideClassMapper.init(compassConfiguration, (Map) configurationContext.get("customConverters"), defaultExcludes, defaultFormats);
AppConfigMappingConfigurator appConfigConfigurator = new AppConfigMappingConfigurator(grailsApplication.getConfig());
appConfigConfigurator.setMappingDescriptionProviderManager(overrideClassMapper);
appConfigConfigurator.setCompassClassMappingXmlBuilder(classMappingXmlBuilder);