Choose a topic to test your knowledge and improve your Spring Boot skills
Full name of CORS?
CORS is a security concept that allows restricting the resources implemented in web browsers
Choose correct for CORS
@CrossOrigin annotation supports specific REST API
@CrossOrigin annotation supports specific REST API, and not for the entire application.
Enable CORS in Controller Method
CORS Configuration can be Globally?
@Bean configuration to set the CORS configuration support globally to your Spring Boot application.
@Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurerAdapter() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/products").allowedOrigins("http://localhost:9000"); } }; }