Access to XMLHttpRequest at 'http://localhost:8081/api/v1/employees' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 Fix :

Add the add cross controller to springboot controller class

Ex : @CrossOrigin(origins ="http://localhost:3000/" )



Comments

Popular posts from this blog

"status": 404, "error": "not found", "message": "no message available", "path": "/api/employee"

There was an unexpected error (type=Not Found, status=404). No message available in Springboot