From 9f3ffa23d9e237b130957c4463a26fc3384b7e51 Mon Sep 17 00:00:00 2001 From: Cleverson Sacramento Date: Wed, 6 Feb 2013 15:10:47 -0300 Subject: [PATCH] Correção no carregamento da configuração com prefixos --- impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/configuration/ConfigurationLoader.java | 4 +--- impl/extension/jdbc/src/main/resources/META-INF/beans.xml | 40 ++++++++++++++++++++++++++++++++++++++++ impl/extension/jdbc/src/main/resources/demoiselle-jaas-bundle.properties | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 impl/extension/jdbc/src/main/resources/META-INF/beans.xml create mode 100644 impl/extension/jdbc/src/main/resources/demoiselle-jaas-bundle.properties 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 5a1cb87..6eb29b4 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 @@ -434,8 +434,6 @@ public class ConfigurationLoader implements Serializable { this.prefix = type.getAnnotation(Configuration.class).prefix(); if (this.prefix == null) { this.prefix = ""; - } else { - this.prefix += "."; } if (field.isAnnotationPresent(Name.class)) { @@ -443,7 +441,7 @@ public class ConfigurationLoader implements Serializable { } else { this.name = getNameByField(field); } - + this.key = this.prefix + this.name; } diff --git a/impl/extension/jdbc/src/main/resources/META-INF/beans.xml b/impl/extension/jdbc/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000..527e828 --- /dev/null +++ b/impl/extension/jdbc/src/main/resources/META-INF/beans.xml @@ -0,0 +1,40 @@ + + + + \ No newline at end of file diff --git a/impl/extension/jdbc/src/main/resources/demoiselle-jaas-bundle.properties b/impl/extension/jdbc/src/main/resources/demoiselle-jaas-bundle.properties new file mode 100644 index 0000000..3f1fa2e --- /dev/null +++ b/impl/extension/jdbc/src/main/resources/demoiselle-jaas-bundle.properties @@ -0,0 +1,34 @@ +# Demoiselle Framework +# Copyright (C) 2010 SERPRO +# ---------------------------------------------------------------------------- +# This file is part of Demoiselle Framework. +# +# Demoiselle Framework is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public License version 3 +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License version 3 +# along with this program; if not, see +# or write to the Free Software Foundation, Inc., 51 Franklin Street, +# Fifth Floor, Boston, MA 02110-1301, USA. +# ---------------------------------------------------------------------------- +# Este arquivo é parte do Framework Demoiselle. +# +# O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou +# modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação +# do Software Livre (FSF). +# +# Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA +# GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou +# APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português +# para maiores detalhes. +# +# Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título +# "LICENCA.txt", junto com esse programa. Se não, acesse +# ou escreva para a Fundação do Software Livre (FSF) Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. -- libgit2 0.21.2