autenticacao-professor/src/main/java/com/boto/autenticacaoprofessor/config/WebConfiguration.java
<gh_stars>0package com.boto.autenticacaoprofessor.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@EnableWebMvc
@Configuration
public class WebConfiguration implements WebMvcConfigurer {
    public void addCorsMappings (CorsRegistry registry){
        registry.addMapping("/**").allowedMethods("GET","POST","PUT","DELETE", "OPTIONS");
    }
}
