Fiz o Seguinte Controller:
@RestController
@RequestMapping("/api/region")
public class RegionController
@GetMapping("/findRegionByCompany")
public ResponseEntity<List<Region>> findRegionByCompany(@RequestParam("company") Integer company) throws IOException, JAXBException {
return ResponseEntity.ok().body(regionRepository.getRegionByCompany(company));
}
Tento fazer o teste no Postman, porém retorna o erro abaixo:
"timestamp": 1566306312404,
"status": 400,
"error": "Bad Request",
"exception": "org.springframework.web.bind.MissingServletRequestParameterException",
"message": "Required Integer parameter 'company' is not present",
"path": "/inspecao/api/region/findRegionByCompany"
Se mudo para PostMapping, dá certo, porém preciso executar um GetMapping.