@Bean configuration to set the CORS configuration support globally to your Spring Boot application.
1.true
2.flase
@Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurerAdapter() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/products").allowedOrigins("http://localhost:9000"); } }; }
1.Syntax to set the CORS configuration support globally to your Spring Boot application.
2.Syntax to set the CORS configuration support specific REST API .
3.Both
4.None
@CrossOrigin annotation supports specific REST API
1.true
2.false
@CrossOrigin annotation supports specific REST API, and not for the entire application.
1.Yes
2.No
Choose correct for CORS
1.CORS prevents the JavaScript code producing or consuming the requests against different origin
2.CORS is a security concept that allows restricting the resources implemented in web browsers.
3.Both
4.Only 1
CORS Configuration can be Globally?
1.Yes
2.No
CORS is a security concept that allows restricting the resources implemented in web browsers
1.true
2.flase
Enable CORS in Controller Method
1.@RequestMapping(value = "/products") @CrossOrigin(origins = "http://localhost:8080") public ResponseEntity
2.@RequestMapping(value = "/products") @CrossCORSOrigin(origins = "http://localhost:8080") public ResponseEntity
3.Both
4.None
Full name of CORS?
1.Cross-Origin Resource Sharing (CORS)
2.Cross-Origin Resource and Servers
3.Cross-Origin Resource and Services
4.None