From 7395539b51deb417b3e869b8146e746cc61b5400 Mon Sep 17 00:00:00 2001 From: alberto Date: Wed, 31 Jul 2019 13:52:40 +0000 Subject: [PATCH] =?UTF-8?q?Adicionar=20Informa=C3=A7=C3=A3o=20do=20Ambient?= =?UTF-8?q?e=20utilizado=20na=20Embarcada=20bug#15195=20dev:trevezani=20qu?= =?UTF-8?q?a:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@96260 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../ventaboletos/rest/AmbienteRS.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/java/com/rjconsultores/ventaboletos/rest/AmbienteRS.java diff --git a/src/java/com/rjconsultores/ventaboletos/rest/AmbienteRS.java b/src/java/com/rjconsultores/ventaboletos/rest/AmbienteRS.java new file mode 100644 index 000000000..3f8c57534 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/rest/AmbienteRS.java @@ -0,0 +1,24 @@ +package com.rjconsultores.ventaboletos.rest; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import com.rjconsultores.ventaboletos.dao.ConstanteDAO; +import com.rjconsultores.ventaboletos.entidad.Constante; +import com.rjconsultores.ventaboletos.web.utilerias.spring.AppContext; + +@Path("/ambiente") +public class AmbienteRS { + + @GET + @Produces({ MediaType.APPLICATION_JSON }) + public String getVersao() { + ConstanteDAO constanteDAO = (ConstanteDAO) AppContext.getApplicationContext().getBean("constanteDAO"); + Constante constante = constanteDAO.buscarPorNomeConstante("NOMBRE_AMBIENTE"); + + return constante.getValorconstante(); + } + +}