Advertisement
andersonalmada

Untitled

Jul 22nd, 2022
1,012
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. package br.ufc.mandacaru5.config;
  2.  
  3. import org.springframework.context.annotation.Configuration;
  4. import org.springframework.web.servlet.config.annotation.CorsRegistry;
  5. import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
  6.  
  7. @Configuration
  8. public class CorsConfiguration implements WebMvcConfigurer {
  9.  
  10.     @Override
  11.     public void addCorsMappings(CorsRegistry registry) {
  12.         registry.addMapping("/**").allowedOrigins("*").allowedMethods("GET", "POST", "PUT", "DELETE");
  13.     }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement