Skip to content
Snippets Groups Projects
Commit a0274a88 authored by Eliott Collin's avatar Eliott Collin
Browse files

set DetailsDto can send xml but set json by default

parent b778e4cc
Branches master
No related tags found
No related merge requests found
...@@ -2,7 +2,9 @@ package fr.ulille.iut.tva.dto; ...@@ -2,7 +2,9 @@ package fr.ulille.iut.tva.dto;
import fr.ulille.iut.tva.service.CalculTva; import fr.ulille.iut.tva.service.CalculTva;
import fr.ulille.iut.tva.service.TauxTva; import fr.ulille.iut.tva.service.TauxTva;
import jakarta.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class DetailTauxDto { public class DetailTauxDto {
private double montantTotal; private double montantTotal;
private double montantTva; private double montantTva;
......
...@@ -61,6 +61,7 @@ public class TvaRessource { ...@@ -61,6 +61,7 @@ public class TvaRessource {
@GET @GET
@Path("details/{taux}") @Path("details/{taux}")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public DetailTauxDto getDetail( public DetailTauxDto getDetail(
@PathParam("taux") String taux, @PathParam("taux") String taux,
@QueryParam("somme") double somme) { @QueryParam("somme") double somme) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment