📜  cors spring - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:12.788000             🧑  作者: Mango

代码示例3
@Configuration
@EnableWebMvc
public class WebConfig implements WebMvcConfigurer {

    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**");
    }
}