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

Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]:

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