diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/configuration/ConfigurationLoader.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/configuration/ConfigurationLoader.java index c187b02..ec7830a 100644 --- a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/configuration/ConfigurationLoader.java +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/configuration/ConfigurationLoader.java @@ -118,11 +118,9 @@ public class ConfigurationLoader implements Serializable { if (config != null) { Key key = new Key(field, clazz, config); - if(validateKey(resource, key, type, config)){ - Object value = getValue(key, field, config); - validate(field, key, value, resource); - setValue(field, key, object, value); - } + Object value = getValue(key, field, config); + validate(field, key, value, resource); + setValue(field, key, object, value); } } } @@ -142,24 +140,6 @@ public class ConfigurationLoader implements Serializable { } } - private boolean validateKey(String resource, Key key, ConfigType type, org.apache.commons.configuration.Configuration config){ - if(!config.containsKey(key.toString())){ - if(type.toString().equals("PROPERTIES")){ - getLogger().info(getBundle().getString("key-not-found-in-file", key, resource + ".properties")); - }else{ - if(type.toString().equals("XML")){ - getLogger().info(getBundle().getString("key-not-found-in-file", key, resource + ".xml")); - }else{ - if(type.toString().equals("SYSTEM")){ - getLogger().info(getBundle().getString("key-not-found-in-system", key)); - } - } - } - return false; - } - return true; - } - /** * Returns the configuration class according to specified resource name and configuration type. * @@ -468,6 +448,10 @@ public class ConfigurationLoader implements Serializable { } this.key = this.prefix + this.name; + + if(!config.containsKey(key.toString())){ + getLogger().debug(getBundle().getString("key-not-found", key)); + } } private String getNameByAnnotation(Field field) { diff --git a/impl/core/src/main/resources/demoiselle-core-bundle.properties b/impl/core/src/main/resources/demoiselle-core-bundle.properties index 8cdbdf6..390e39a 100644 --- a/impl/core/src/main/resources/demoiselle-core-bundle.properties +++ b/impl/core/src/main/resources/demoiselle-core-bundle.properties @@ -35,8 +35,7 @@ engine-on=Ligando os motores do Demoiselle ${project.version} resource-not-found=Arquivo {0} n\u00E3o foi encontrado -key-not-found-in-file=A chave {0} n\u00E3o foi encontrada no arquivo {1} -key-not-found-in-system=A vari\u00E1vel de ambiente {0} n\u00E3o foi encontrada no sistema +key-not-found=A chave {0} n\u00E3o foi encontrada ambiguous-strategy-resolution=Foi detectada ambiguidade da interface "{0}" com as seguintes implementa\u00E7\u00F5es\: "{1}". Para resolver o conflito, defina explicitamente a implementa\u00E7\u00E3o no demoiselle.properties. bean-not-found=Voc\u00EA est\u00E1 tentando obter um objeto n\u00E3o reconhecido pelo CDI via Beans.getReference({0}) more-than-one-exceptionhandler-defined-for-same-class=Foi definido mais de um m\u00E9todo na classe {0} para tratar a exce\u00E7\u00E3o {1} -- libgit2 0.21.2