首页>代码>springboot2整合vue开发在线音乐网站>/music-server/src/main/java/com/example/demo/config/WebMvcConfig.java
package com.example.demo.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**")
                .allowedOrigins("*")
                .allowedMethods("*")
                .allowCredentials(true);
    }
}
最近下载更多
落后就要挨打  LV26 4月30日
3263394665  LV9 2023年11月29日
阿凡达  LV9 2023年10月20日
wq011020  LV1 2023年10月18日
xk16675552250  LV33 2023年10月7日
2304972630  LV3 2023年9月26日
拜托你仔细听  LV3 2023年9月21日
qazwsx0987  LV5 2023年9月13日
syczzxj  LV9 2023年8月1日
小代123abc  LV3 2023年6月30日
最近浏览更多
198536 5月22日
暂无贡献等级
小黄同学  LV7 5月21日
求学的熊猫  LV8 5月20日
Uting  LV3 5月9日
IT小牛  LV3 5月8日
dunwei 5月3日
暂无贡献等级
落后就要挨打  LV26 4月30日
dafei111  LV1 4月29日
Tuan5555  LV12 4月22日
freedom66  LV2 4月21日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友