Package br.com.pawsoncloud.controladores
Class AnimaisControle
java.lang.Object
br.com.pawsoncloud.controladores.AnimaisControle
Controller responsável por manipular operações relacionadas aos animais.
- Author:
- Edielson Assis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<org.springframework.data.domain.Page<AnimaisResponseDto>>
findAll
(org.springframework.data.domain.Pageable pageable) Retorna uma lista paginada com todos os animais.org.springframework.http.ResponseEntity<AnimaisRespDto>
Retorna um animal específico.
-
Constructor Details
-
AnimaisControle
public AnimaisControle()
-
-
Method Details
-
findAll
@GetMapping public org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<AnimaisResponseDto>> findAll(@PageableDefault(size=10,sort="id") org.springframework.data.domain.Pageable pageable) Retorna uma lista paginada com todos os animais.- Parameters:
pageable
- lista de animais.- Returns:
- Um json com todos os animais e o código http 200.
-
findById
@GetMapping("/{id}") public org.springframework.http.ResponseEntity<AnimaisRespDto> findById(@PathVariable Long id) Retorna um animal específico.- Parameters:
id
- ID do animal.- Returns:
- Um json com os dados do animal e o código http 200.
-