Enable CORS in Controller Method

General knowledge(GK) - Online Exam Test Papers | General knowledge(GK) - MCQs[multiple choice questions and answers ] | General knowledge(GK) - Mock Test Papers | General knowledge(GK) - Practice Papers | General knowledge(GK) - Sample Test Papers |

Question:
Enable CORS in Controller Method

1.@RequestMapping(value = "/products") @CrossOrigin(origins = "http://localhost:8080") public ResponseEntity getProduct() { return null; }

2.@RequestMapping(value = "/products") @CrossCORSOrigin(origins = "http://localhost:8080") public ResponseEntity getProduct() { return null; }

3.Both

4.None

Posted Date:-2020-11-25 01:22:46


More MCQS Questions and answers