zoukankan      html  css  js  c++  java
  • 解决请求跨域

    package com.jeesite.modules;
    
    import org.springframework.context.annotation.Configuration;
    import org.springframework.web.servlet.config.annotation.CorsRegistry;
    import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
    
    /**
     * @ClassName CORSConfiguration
     * @Description
     * @Author: dsh
     * @Date: 2019/6/3 10:41
     * @Version V1.0
     **/
    @Configuration
    public class CORSConfiguration extends WebMvcConfigurerAdapter {
        @Override
        public void addCorsMappings(CorsRegistry registry) {
            registry.addMapping("/**")
                    .allowedMethods("*")
                    .allowedOrigins("*")
                    .allowedHeaders("*");
            super.addCorsMappings(registry);
        }
    }
  • 相关阅读:
    Yarn
    easyui
    eclipse-android
    js-小技能 そうですか
    sql server 时间处理
    上传文件
    时间 & 时间戳 之间 转换
    JDIC
    Spring 定时器
    映射
  • 原文地址:https://www.cnblogs.com/dsh2018/p/11289291.html
Copyright © 2011-2022 走看看