The Angular call to a web service GET method is not working
I have created a spring boot web service. It works on the browser, but when I call it from the Angular code it does not. I have checked the URL on the browser and it works. The URL I use on the angular code is correct. On the web browser I am using http://localhost:8080/rofile/roles/find/9
on the findbyId()
is also the same.
@GetMapping(value = "/find/{id}")
@ResponseBody
public RoleVO findRole(@PathVariable("id") Long id)
{
return roleService.findById(id);
}
public findById(id: number) {
return this.http.get(this.rolesUrl + '/find/' + id);
}
I expected the call to the web service method to go through. But it seems as if the web service call is not getting through.