Removal of the showResourcesVetList method dead code: no more JSON export feature

Signed-off-by: Antoine Rey <antoine.rey@free.fr>
This commit is contained in:
Antoine Rey 2025-03-13 08:57:41 +01:00
parent 2aa53f929d
commit f0be1771ad
No known key found for this signature in database
GPG key ID: CE81041B1653289B
2 changed files with 0 additions and 18 deletions

View file

@ -24,7 +24,6 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
/** /**
* @author Juergen Hoeller * @author Juergen Hoeller
@ -66,13 +65,4 @@ class VetController {
return vetRepository.findAll(pageable); return vetRepository.findAll(pageable);
} }
@GetMapping({ "/vets" })
public @ResponseBody Vets showResourcesVetList() {
// Here we are returning an object of type 'Vets' rather than a collection of Vet
// objects so it is simpler for JSon/Object mapping
Vets vets = new Vets();
vets.getVetList().addAll(this.vetRepository.findAll());
return vets;
}
} }

View file

@ -89,12 +89,4 @@ class VetControllerTests {
} }
@Test
void testShowResourcesVetList() throws Exception {
ResultActions actions = mockMvc.perform(get("/vets").accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk());
actions.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andExpect(jsonPath("$.vetList[0].id").value(1));
}
} }